diff --git a/.changeset/strange-impalas-remember.md b/.changeset/strange-impalas-remember.md new file mode 100644 index 0000000..819d5ff --- /dev/null +++ b/.changeset/strange-impalas-remember.md @@ -0,0 +1,5 @@ +--- +'rankify-contracts': minor +--- + +Re-deploy contracts and update token metadata to correspond to music challenge of first game diff --git a/assets/musicRankToken.json b/assets/musicRankToken.json new file mode 100644 index 0000000..5704a73 --- /dev/null +++ b/assets/musicRankToken.json @@ -0,0 +1,6 @@ +{ + "name": "Music Guru", + "description": "This token is awarded for winning game of music taste!", + "image": "https://assets.vote4best.app/music_challenge_logo.png", + "external_url": "https://rankify.it/challenges/music" +} diff --git a/assets/music_challenge_logo.png b/assets/music_challenge_logo.png new file mode 100644 index 0000000..517a603 Binary files /dev/null and b/assets/music_challenge_logo.png differ diff --git a/deploy/01_deployRankToken.ts b/deploy/01_deployRankToken.ts index d7bca6e..555725f 100644 --- a/deploy/01_deployRankToken.ts +++ b/deploy/01_deployRankToken.ts @@ -3,12 +3,9 @@ import { DeployFunction } from 'hardhat-deploy/types'; import { ethers } from 'hardhat'; import path from 'path'; const ASSETS_PREFIX = 'https://assets.vote4best.app/'; -const contractURI = path.join(ASSETS_PREFIX, 'rankToken.json'); +const contractURI = path.join(ASSETS_PREFIX, 'musicRankToken.json'); const tURI = path.join(ASSETS_PREFIX, 'rank'); -// import { -// MULTIPASS_CONTRACT_VERSION, -// MULTIPASS_CONTRACT_NAME, -// } from "../../test/utils"; + const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts } = hre; const { deploy } = deployments; diff --git a/deployments/anvil/RankToken.json b/deployments/anvil/RankToken.json index 801b7b2..601d026 100644 --- a/deployments/anvil/RankToken.json +++ b/deployments/anvil/RankToken.json @@ -1,5 +1,5 @@ { - "address": "0x231E0B68978ca2015a8c3CaE7AA3cA34dC1700bC", + "address": "0xBbDA1841822cc43954FA455aB1cB9DE5F9270894", "abi": [ { "inputs": [ @@ -37,27 +37,6 @@ "stateMutability": "nonpayable", "type": "constructor" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "required", - "type": "uint256" - } - ], - "name": "insufficient", - "type": "error" - }, { "anonymous": false, "inputs": [ @@ -896,22 +875,22 @@ "type": "function" } ], - "transactionHash": "0x14c4f1bc3f2dac4919d8b94c43aef626503dd7f9d1032285da6c5bcde9f38b51", + "transactionHash": "0xb3c0a0e8254d8c5cde8dad339ad54209122eca446578c334d9079e8896a4317e", "receipt": { "to": null, "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", - "contractAddress": "0x231E0B68978ca2015a8c3CaE7AA3cA34dC1700bC", + "contractAddress": "0xBbDA1841822cc43954FA455aB1cB9DE5F9270894", "transactionIndex": 0, - "gasUsed": "3151028", - "logsBloom": "0x00008000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000008000000000000000000400000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000", - "blockHash": "0x4d86beb2772485b28e05752e5ee06c67bdcff110f4aa717075a661c79dc5a8fe", - "transactionHash": "0x14c4f1bc3f2dac4919d8b94c43aef626503dd7f9d1032285da6c5bcde9f38b51", + "gasUsed": "3752258", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000002800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000000000020000000000000010000000000000000000000000000000000000000000000001000", + "blockHash": "0xccc5325f71875bac507b2a5b5207a729c151accefcded54882b197aa77322ffb", + "transactionHash": "0xb3c0a0e8254d8c5cde8dad339ad54209122eca446578c334d9079e8896a4317e", "logs": [ { "transactionIndex": 0, - "blockNumber": 1, - "transactionHash": "0x14c4f1bc3f2dac4919d8b94c43aef626503dd7f9d1032285da6c5bcde9f38b51", - "address": "0x231E0B68978ca2015a8c3CaE7AA3cA34dC1700bC", + "blockNumber": 488, + "transactionHash": "0xb3c0a0e8254d8c5cde8dad339ad54209122eca446578c334d9079e8896a4317e", + "address": "0xBbDA1841822cc43954FA455aB1cB9DE5F9270894", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -919,13 +898,13 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x4d86beb2772485b28e05752e5ee06c67bdcff110f4aa717075a661c79dc5a8fe" + "blockHash": "0xccc5325f71875bac507b2a5b5207a729c151accefcded54882b197aa77322ffb" }, { "transactionIndex": 0, - "blockNumber": 1, - "transactionHash": "0x14c4f1bc3f2dac4919d8b94c43aef626503dd7f9d1032285da6c5bcde9f38b51", - "address": "0x231E0B68978ca2015a8c3CaE7AA3cA34dC1700bC", + "blockNumber": 488, + "transactionHash": "0xb3c0a0e8254d8c5cde8dad339ad54209122eca446578c334d9079e8896a4317e", + "address": "0xBbDA1841822cc43954FA455aB1cB9DE5F9270894", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000006cf8d74c7875de8c2ffb09228f4bf2a21b25e583", @@ -933,27 +912,27 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x4d86beb2772485b28e05752e5ee06c67bdcff110f4aa717075a661c79dc5a8fe" + "blockHash": "0xccc5325f71875bac507b2a5b5207a729c151accefcded54882b197aa77322ffb" } ], - "blockNumber": 1, - "cumulativeGasUsed": "3151028", + "blockNumber": 488, + "cumulativeGasUsed": "3752258", "status": 1, "byzantium": true }, "args": [ "https:/assets.vote4best.app/rank", "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", - "https:/assets.vote4best.app/rankToken.json", + "https:/assets.vote4best.app/musicRankToken.json", "3", [], [] ], "numDeployments": 1, - "solcInputHash": "bd58975ffd7280b06225c119ff824fc6", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"cURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"levelUpThreshold\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"components\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"componentWeights\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"insufficient\",\"type\":\"error\"},{\"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\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"Leader\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"LevelUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"RankUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRankingInstance\",\"type\":\"address\"}],\"name\":\"RankingInstanceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TokensLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TokensUnlocked\",\"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\":[{\"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\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"batchMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decompose\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oldRank\",\"type\":\"uint256\"}],\"name\":\"findNewRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComponents\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRankingInstance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"level\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"levelUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"level\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"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\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setContractURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unlockedBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRankingInstance\",\"type\":\"address\"}],\"name\":\"updateRankingInstance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`.\"},\"TransferBatch(address,address,address,uint256[],uint256[])\":{\"details\":\"Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers.\"},\"TransferSingle(address,address,address,uint256,uint256)\":{\"details\":\"Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\"},\"URI(string,uint256)\":{\"details\":\"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}.\"}},\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateRankingInstance(address)\":{\"details\":\"Updates the address of the ranking instance contract.\",\"params\":{\"newRankingInstance\":\"The new address of the ranking instance contract.\"}},\"uri(uint256)\":{\"details\":\"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.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/tokens/RankToken.sol\":\"RankToken\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/CompositeERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"./LockableERC1155.sol\\\";\\n\\nabstract contract CompositeERC1155 is LockableERC1155 {\\n address[] private dimensions;\\n uint256[] private weights;\\n\\n constructor(string memory uri_, address[] memory dimensionTokens, uint256[] memory tokenWeights) ERC1155(uri_) {\\n require(dimensionTokens.length == tokenWeights.length, \\\"Array lengths must be equal\\\");\\n dimensions = dimensionTokens;\\n weights = tokenWeights;\\n }\\n\\n function _mint(address to, uint256 tokenId, uint256 value, bytes memory data) internal virtual override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).lock(to, tokenId, value * weights[i]);\\n }\\n super._mint(to, tokenId, value, data);\\n }\\n\\n function _burn(address from, uint256 id, uint256 amount) internal override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n CompositeERC1155(dimensions[i]).burn(from, id, amount * weights[i]);\\n }\\n super._burn(from, id, amount);\\n }\\n\\n function decompose(address from, uint256 id, uint256 amount) public virtual {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).unlock(from, id, amount * weights[i]);\\n }\\n _burn(from, id, amount);\\n }\\n\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function getComponents() public virtual returns (address[] memory, uint256[] memory) {\\n return (dimensions, weights);\\n }\\n}\\n\",\"keccak256\":\"0xf847c77ad7f62c0e20d9a485612fb368b7e29d2ede12103a849d1b380956f62e\",\"license\":\"Apache-2.0\"},\"src/abstracts/LockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {ILockableERC1155} from \\\"../interfaces/ILockableERC1155.sol\\\";\\nerror insufficient(uint256 id, uint256 balance, uint256 required);\\n\\nabstract contract LockableERC1155 is ERC1155, ILockableERC1155 {\\n mapping(address => mapping(uint256 => uint256)) lockedAmounts;\\n\\n function lock(address account, uint256 id, uint256 amount) public virtual {\\n if (balanceOf(account, id) < lockedAmounts[account][id] + amount)\\n revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] += amount;\\n emit TokensLocked(account, id, amount);\\n }\\n\\n function unlock(address account, uint256 id, uint256 amount) public virtual {\\n if (lockedAmounts[account][id] < amount) revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] -= amount;\\n emit TokensUnlocked(account, id, amount);\\n }\\n\\n function unlockedBalanceOf(address account, uint256 id) public view returns (uint256) {\\n return balanceOf(account, id) - lockedAmounts[account][id];\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (from != address(0)) {\\n if (lockedAmounts[from][ids[i]] + amounts[i] > balanceOf(from, ids[i])) {\\n revert insufficient(ids[i], unlockedBalanceOf(from, ids[i]), amounts[i]);\\n }\\n }\\n }\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x112b91853da48f8cf82ccda87288ab00b3ad6dbc708915e628a2e784d6d961c3\",\"license\":\"Apache-2.0\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa4e36c5fadc0473a8870de121f1d941e269e806f27434627cabd0fe06f7ed8c1\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the address of the ranking instance contract.\\n * @param newRankingInstance The new address of the ranking instance contract.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n function getRankingInstance() external view returns (address);\\n\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x47399aed56679f0b38768afcb4969bc4d13fe5c073310a6e2db547d8c7a5af77\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4fa16578c39d7fdd1780c594fdab4a665036f96ceefc22bb0a962fdb9c383371\",\"license\":\"MIT\"},\"src/tokens/RankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/CompositeERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\npragma solidity ^0.8.20;\\n\\ncontract RankToken is CompositeERC1155, Ownable, IRankToken {\\n string private _contractURI;\\n mapping(address => uint256) public rank;\\n uint256 public topRank;\\n address private _rankingInstance;\\n uint256 _levelUpThreshold;\\n\\n modifier onlyRankingInstance() {\\n require(msg.sender == _rankingInstance, \\\"only ranking contract can do that\\\");\\n _;\\n }\\n\\n constructor(\\n string memory uri_,\\n address owner_,\\n string memory cURI,\\n uint256 levelUpThreshold,\\n address[] memory components,\\n uint256[] memory componentWeights\\n ) CompositeERC1155(uri_, components, componentWeights) {\\n require(owner_ != address(0), \\\"must specify owner of the contract\\\");\\n _contractURI = cURI;\\n _levelUpThreshold = levelUpThreshold;\\n transferOwnership(owner_);\\n }\\n\\n function getRankingInstance() public view returns (address) {\\n return _rankingInstance;\\n }\\n\\n function contractURI() public view returns (string memory) {\\n return _contractURI;\\n }\\n\\n function setURI(string memory uri_) public onlyOwner {\\n _setURI(uri_);\\n }\\n\\n function setContractURI(string memory uri_) public onlyOwner {\\n _contractURI = uri_;\\n }\\n\\n event Leader(address indexed account, uint256 indexed rank);\\n\\n function _mintRank(address to, uint256 amount, uint256 level, bytes memory data) private {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amount != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(level != 0, \\\"RankToken->mint: pool id not specified\\\");\\n if (level > topRank) {\\n topRank = level;\\n emit Leader(to, level);\\n }\\n _mint(to, level, amount, data);\\n }\\n\\n function mint(address to, uint256 amount, uint256 level, bytes memory data) public onlyRankingInstance {\\n _mintRank(to, amount, level, data);\\n }\\n\\n function updateRankingInstance(address newRankingInstance) public onlyOwner {\\n require(newRankingInstance != address(0), \\\"must specify ranking instance\\\");\\n _rankingInstance = newRankingInstance;\\n emit RankingInstanceUpdated(newRankingInstance);\\n }\\n\\n function lock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.lock(account, id, amount);\\n }\\n\\n function unlock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.unlock(account, id, amount);\\n }\\n\\n function batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public onlyRankingInstance {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amounts.length != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(ids.length != 0, \\\"RankToken->mint: pool id not specified\\\");\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function levelUp(address to, uint256 level, bytes memory data) public {\\n require(to == msg.sender || msg.sender == _rankingInstance, \\\"levelUp: Not permitted\\\");\\n _burn(to, level, _levelUpThreshold);\\n _mintRank(to, 1, level, data);\\n emit LevelUp(to, level);\\n }\\n\\n function findNewRank(address account, uint256 oldRank) public view returns (uint256) {\\n for (uint256 i = oldRank; i > 0; i--) {\\n uint256 _balanceTemp = balanceOf(account, i);\\n if (_balanceTemp > 0) return i;\\n }\\n return 0;\\n }\\n\\n event RankUpdated(address indexed account, uint256 indexed rank);\\n\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (rank[to] < ids[i] && amounts[i] != 0) {\\n rank[to] = ids[i];\\n emit RankUpdated(to, ids[i]);\\n }\\n if (from != address(0) && (rank[from] != findNewRank(from, rank[from]))) {\\n uint256 newRankFrom = findNewRank(from, rank[from]);\\n rank[from] = newRankFrom;\\n emit RankUpdated(from, newRankFrom);\\n }\\n\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n }\\n\\n //ToDo: Rename in to rankOf(address account)\\n function getAccountRank(address account) external view returns (uint256) {\\n return rank[account];\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC1155) returns (bool) {\\n return interfaceId == type(IRankToken).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x2a333824a5509334058ab6ac8d92fb32a04436f9e15aca1ea1de60647996f7f5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162003c4138038062003c4183398101604081905262000034916200056d565b85828282620000438162000172565b5080518251146200009b5760405162461bcd60e51b815260206004820152601b60248201527f4172726179206c656e67746873206d75737420626520657175616c000000000060448201526064015b60405180910390fd5b8151620000b0906004906020850190620002b7565b508051620000c690600590602084019062000321565b50505050620000e4620000de6200018460201b60201c565b62000188565b6001600160a01b038516620001475760405162461bcd60e51b815260206004820152602260248201527f6d7573742073706563696679206f776e6572206f662074686520636f6e74726160448201526118dd60f21b606482015260840162000092565b6007620001558582620006d0565b50600b8390556200016685620001da565b5050505050506200079c565b6002620001808282620006d0565b5050565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001e462000259565b6001600160a01b0381166200024b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000092565b620002568162000188565b50565b6006546001600160a01b03163314620002b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000092565b565b8280548282559060005260206000209081019282156200030f579160200282015b828111156200030f57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002d8565b506200031d9291506200035f565b5090565b8280548282559060005260206000209081019282156200030f579160200282015b828111156200030f57825182559160200191906001019062000342565b5b808211156200031d576000815560010162000360565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620003b757620003b762000376565b604052919050565b600082601f830112620003d157600080fd5b81516001600160401b03811115620003ed57620003ed62000376565b602062000403601f8301601f191682016200038c565b82815285828487010111156200041857600080fd5b60005b83811015620004385785810183015182820184015282016200041b565b506000928101909101919091529392505050565b80516001600160a01b03811681146200046457600080fd5b919050565b60006001600160401b0382111562000485576200048562000376565b5060051b60200190565b600082601f830112620004a157600080fd5b81516020620004ba620004b48362000469565b6200038c565b82815260059290921b84018101918181019086841115620004da57600080fd5b8286015b848110156200050057620004f2816200044c565b8352918301918301620004de565b509695505050505050565b600082601f8301126200051d57600080fd5b8151602062000530620004b48362000469565b82815260059290921b840181019181810190868411156200055057600080fd5b8286015b8481101562000500578051835291830191830162000554565b60008060008060008060c087890312156200058757600080fd5b86516001600160401b03808211156200059f57600080fd5b620005ad8a838b01620003bf565b9750620005bd60208a016200044c565b96506040890151915080821115620005d457600080fd5b620005e28a838b01620003bf565b95506060890151945060808901519150808211156200060057600080fd5b6200060e8a838b016200048f565b935060a08901519150808211156200062557600080fd5b506200063489828a016200050b565b9150509295509295509295565b600181811c908216806200065657607f821691505b6020821081036200067757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006cb57600081815260208120601f850160051c81016020861015620006a65750805b601f850160051c820191505b81811015620006c757828155600101620006b2565b5050505b505050565b81516001600160401b03811115620006ec57620006ec62000376565b6200070481620006fd845462000641565b846200067d565b602080601f8311600181146200073c5760008415620007235750858301515b600019600386901b1c1916600185901b178555620006c7565b600085815260208120601f198616915b828110156200076d578886015182559484019460019091019084016200074c565b50858210156200078c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61349580620007ac6000396000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638b81c63911610104578063b5674c68116100a2578063f242432a11610071578063f242432a1461041f578063f2fde38b14610432578063f5298aca14610445578063f8f88dc21461045857600080fd5b8063b5674c68146103b5578063e2ab691d146103c8578063e8a3d485146103db578063e985e9c5146103e357600080fd5b806399d50d5d116100de57806399d50d5d14610350578063a22cb46514610366578063a89027f814610379578063b48ab8b6146103a257600080fd5b80638b81c639146103195780638da5cb5b1461032c578063938e3d7b1461033d57600080fd5b80632eb2c2d6116101715780635c87c8f91161014b5780635c87c8f9146102d0578063715018a6146102f5578063731133e9146102fd5780638215eccd1461031057600080fd5b80632eb2c2d61461028a578063468b3b331461029d5780634e1273f4146102b057600080fd5b806302fe5305116101ad57806302fe53051461023157806305917eee146102445780630dbaf77f146102575780630e89341c1461026a57600080fd5b8062fdd58e146101d357806301ffc9a7146101f9578063022b23d51461021c575b600080fd5b6101e66101e13660046129d5565b610478565b6040519081526020015b60405180910390f35b61020c610207366004612a15565b610524565b60405190151581526020016101f0565b61022f61022a366004612a32565b610562565b005b61022f61023f366004612b06565b610663565b61022f610252366004612b57565b610677565b61022f610265366004612b92565b610737565b61027d610278366004612be9565b610806565b6040516101f09190612c48565b61022f610298366004612cf0565b61089a565b6101e66102ab3660046129d5565b61093c565b6102c36102be366004612d9a565b61097b565b6040516101f09190612ea0565b600a546001600160a01b03165b6040516001600160a01b0390911681526020016101f0565b61022f610ab9565b61022f61030b366004612eb3565b610acd565b6101e660095481565b6101e66103273660046129d5565b610b43565b6006546001600160a01b03166102dd565b61022f61034b366004612b06565b610b86565b610358610b9e565b6040516101f0929190612f14565b61022f610374366004612f74565b610c5b565b6101e6610387366004612b57565b6001600160a01b031660009081526008602052604090205490565b61022f6103b0366004612fb0565b610c66565b61022f6103c3366004612a32565b610e12565b61022f6103d6366004612a32565b610e81565b61027d610ef0565b61020c6103f136600461303d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61022f61042d366004613070565b610f82565b61022f610440366004612b57565b61101d565b61022f610453366004612a32565b6110aa565b6101e6610466366004612b57565b60086020526000908152604090205481565b60006001600160a01b0383166104fb5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982167fb0262bf600000000000000000000000000000000000000000000000000000000148061051e575061051e82611143565b60005b6004548110156106525760048181548110610582576105826130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663b5674c688585600585815481106105c3576105c36130d5565b9060005260206000200154866105d99190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561062757600080fd5b505af115801561063b573d6000803e3d6000fd5b50505050808061064a90613118565b915050610565565b5061065e8383836111de565b505050565b61066b6112da565b61067481611334565b50565b61067f6112da565b6001600160a01b0381166106d55760405162461bcd60e51b815260206004820152601d60248201527f6d75737420737065636966792072616e6b696e6720696e7374616e636500000060448201526064016104f2565b600a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f6a0707879bc3853a8fcf9dbebe74a41dd8ea34813c262a58f1f99038559d1e2190600090a250565b6001600160a01b0383163314806107585750600a546001600160a01b031633145b6107a45760405162461bcd60e51b815260206004820152601660248201527f6c6576656c55703a204e6f74207065726d69747465640000000000000000000060448201526064016104f2565b6107b18383600b546111de565b6107be8360018484611340565b826001600160a01b03167f91e51c29e7e87a74ad3b8ccba98538970f50a4309242735467f41e27c6b0fbac836040516107f991815260200190565b60405180910390a2505050565b60606002805461081590613132565b80601f016020809104026020016040519081016040528092919081815260200182805461084190613132565b801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806108b657506108b685336103f1565b6109285760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b61093585858585856114cc565b5050505050565b6001600160a01b038216600090815260036020908152604080832084845290915281205461096a8484610478565b610974919061316c565b9392505050565b606081518351146109f45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016104f2565b6000835167ffffffffffffffff811115610a1057610a10612a65565b604051908082528060200260200182016040528015610a39578160200160208202803683370190505b50905060005b8451811015610ab157610a84858281518110610a5d57610a5d6130d5565b6020026020010151858381518110610a7757610a776130d5565b6020026020010151610478565b828281518110610a9657610a966130d5565b6020908102919091010152610aaa81613118565b9050610a3f565b509392505050565b610ac16112da565b610acb6000611786565b565b600a546001600160a01b03163314610b315760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b610b3d84848484611340565b50505050565b6000815b8015610b7c576000610b598583610478565b90508015610b695750905061051e565b5080610b748161317f565b915050610b47565b5060009392505050565b610b8e6112da565b6007610b9a82826131dc565b5050565b6060806004600581805480602002602001604051908101604052809291908181526020018280548015610bfa57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bdc575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610c4c57602002820191906000526020600020905b815481526020019060010190808311610c38575b50505050509050915091509091565b610b9a3383836117f0565b600a546001600160a01b03163314610cca5760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b6001600160a01b038416610d2f5760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b8151600003610da65760405162461bcd60e51b815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f696669656400000000000000000000000000000000000000000000000000000060648201526084016104f2565b8251600003610e065760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b610b3d84848484611903565b600a546001600160a01b03163314610e765760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b61065e838383611b18565b600a546001600160a01b03163314610ee55760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b61065e838383611c08565b606060078054610eff90613132565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b90613132565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b5050505050905090565b6001600160a01b038516331480610f9e5750610f9e85336103f1565b6110105760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b6109358585858585611d0c565b6110256112da565b6001600160a01b0381166110a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104f2565b61067481611786565b6001600160a01b0383163314806110c657506110c683336103f1565b6111385760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b61065e8383836111de565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806111a657506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061051e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461051e565b60005b6004548110156112ce57600481815481106111fe576111fe6130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663f5298aca85856005858154811061123f5761123f6130d5565b9060005260206000200154866112559190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b1580156112a357600080fd5b505af11580156112b7573d6000803e3d6000fd5b5050505080806112c690613118565b9150506111e1565b5061065e838383611efe565b6006546001600160a01b03163314610acb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f2565b6002610b9a82826131dc565b6001600160a01b0384166113a55760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b8260000361141b5760405162461bcd60e51b815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f696669656400000000000000000000000000000000000000000000000000000060648201526084016104f2565b8160000361147a5760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b6009548211156114c057600982905560405182906001600160a01b038616907f05c066fccc179a1b704e61617b73bc27a30a3162d36704cb8d4305064471a24090600090a35b610b3d848385846120d4565b81518351146115435760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0384166115bf5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104f2565b336115ce8187878787876121d1565b60005b845181101561170a5760008582815181106115ee576115ee6130d5565b60200260200101519050600085838151811061160c5761160c6130d5565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116b25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016104f2565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906116ef90849061329c565b925050819055505050508061170390613118565b90506115d1565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161175a9291906132af565b60405180910390a4611770818787878787612318565b61177e8187878787876124fa565b505050505050565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036118775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6001600160a01b03841661197f5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b81518351146119f65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016104f2565b33611a06816000878787876121d1565b60005b8451811015611aa157838181518110611a2457611a246130d5565b6020026020010151600080878481518110611a4157611a416130d5565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611a89919061329c565b90915550819050611a9981613118565b915050611a09565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611af29291906132af565b60405180910390a4611b0981600087878787612318565b610935816000878787876124fa565b6001600160a01b0383166000908152600360209081526040808320858452909152902054811115611b93576001600160a01b0383166000908152600360209081526040808320858452909152908190205490516331303bbb60e01b8152600481018490526024810191909152604481018290526064016104f2565b6001600160a01b038316600090815260036020908152604080832085845290915281208054839290611bc690849061316c565b909155505060405181815282906001600160a01b038516907f89882ad382a3742d4db24e4dabc5000c5852aed762904db28442e4e1630a1d07906020016118f6565b6001600160a01b0383166000908152600360209081526040808320858452909152902054611c3790829061329c565b611c418484610478565b1015611c97576001600160a01b0383166000908152600360209081526040808320858452909152908190205490516331303bbb60e01b8152600481018490526024810191909152604481018290526064016104f2565b6001600160a01b038316600090815260036020908152604080832085845290915281208054839290611cca90849061329c565b909155505060405181815282906001600160a01b038516907fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d906020016118f6565b6001600160a01b038416611d885760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104f2565b336000611d94856126e6565b90506000611da1856126e6565b9050611db18389898585896121d1565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611e485760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016104f2565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611e8590849061329c565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611ee5848a8a86868a612318565b611ef3848a8a8a8a8a612731565b505050505050505050565b6001600160a01b038316611f7a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b336000611f86846126e6565b90506000611f93846126e6565b9050611fb3838760008585604051806020016040528060008152506121d1565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156120495760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016104f2565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120cb84886000868660405180602001604052806000815250612318565b50505050505050565b60005b6004548110156121c457600481815481106120f4576120f46130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663e2ab691d868660058581548110612135576121356130d5565b90600052602060002001548761214b9190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561219957600080fd5b505af11580156121ad573d6000803e3d6000fd5b5050505080806121bc90613118565b9150506120d7565b50610b3d84848484612874565b60005b8351811015612312576001600160a01b038616156123005761220286858381518110610a7757610a776130d5565b838281518110612214576122146130d5565b602002602001015160036000896001600160a01b03166001600160a01b031681526020019081526020016000206000878581518110612255576122556130d5565b6020026020010151815260200190815260200160002054612276919061329c565b11156123005783818151811061228e5761228e6130d5565b60200260200101516122b9878684815181106122ac576122ac6130d5565b602002602001015161093c565b8483815181106122cb576122cb6130d5565b60200260200101516040516331303bbb60e01b81526004016104f2939291909283526020830191909152604082015260600190565b8061230a81613118565b9150506121d4565b5061177e565b60005b83518110156120cb57838181518110612336576123366130d5565b602002602001015160086000876001600160a01b03166001600160a01b031681526020019081526020016000205410801561238b575082818151811061237e5761237e6130d5565b6020026020010151600014155b15612424578381815181106123a2576123a26130d5565b602002602001015160086000876001600160a01b03166001600160a01b03168152602001908152602001600020819055508381815181106123e5576123e56130d5565b6020026020010151856001600160a01b03167f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb760405160405180910390a35b6001600160a01b0386161580159061247757506001600160a01b03861660009081526008602052604090205461245b908790610b43565b6001600160a01b03871660009081526008602052604090205414155b156124e8576001600160a01b0386166000908152600860205260408120546124a0908890610b43565b6001600160a01b0388166000818152600860205260408082208490555192935083927f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb79190a3505b806124f281613118565b91505061231b565b6001600160a01b0384163b1561177e576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c819061255790899089908890889088906004016132dd565b6020604051808303816000875af1925050508015612592575060408051601f3d908101601f1916820190925261258f9181019061333b565b60015b6126475761259e613358565b806308c379a0036125d757506125b2613374565b806125bd57506125d9565b8060405162461bcd60e51b81526004016104f29190612c48565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016104f2565b6001600160e01b031981167fbc197c8100000000000000000000000000000000000000000000000000000000146120cb5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016104f2565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612720576127206130d5565b602090810291909101015292915050565b6001600160a01b0384163b1561177e576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e619061278e908990899088908890889060040161341c565b6020604051808303816000875af19250505080156127c9575060408051601f3d908101601f191682019092526127c69181019061333b565b60015b6127d55761259e613358565b6001600160e01b031981167ff23a6e6100000000000000000000000000000000000000000000000000000000146120cb5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0384166128f05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b3360006128fc856126e6565b90506000612909856126e6565b905061291a836000898585896121d1565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061294a90849061329c565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46129aa83600089858589612318565b6120cb83600089898989612731565b80356001600160a01b03811681146129d057600080fd5b919050565b600080604083850312156129e857600080fd5b6129f1836129b9565b946020939093013593505050565b6001600160e01b03198116811461067457600080fd5b600060208284031215612a2757600080fd5b8135610974816129ff565b600080600060608486031215612a4757600080fd5b612a50846129b9565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715612aa157612aa1612a65565b6040525050565b600067ffffffffffffffff831115612ac257612ac2612a65565b604051612ad96020601f19601f8701160182612a7b565b809150838152848484011115612aee57600080fd5b83836020830137600060208583010152509392505050565b600060208284031215612b1857600080fd5b813567ffffffffffffffff811115612b2f57600080fd5b8201601f81018413612b4057600080fd5b612b4f84823560208401612aa8565b949350505050565b600060208284031215612b6957600080fd5b610974826129b9565b600082601f830112612b8357600080fd5b61097483833560208501612aa8565b600080600060608486031215612ba757600080fd5b612bb0846129b9565b925060208401359150604084013567ffffffffffffffff811115612bd357600080fd5b612bdf86828701612b72565b9150509250925092565b600060208284031215612bfb57600080fd5b5035919050565b6000815180845260005b81811015612c2857602081850181015186830182015201612c0c565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006109746020830184612c02565b600067ffffffffffffffff821115612c7557612c75612a65565b5060051b60200190565b600082601f830112612c9057600080fd5b81356020612c9d82612c5b565b604051612caa8282612a7b565b83815260059390931b8501820192828101915086841115612cca57600080fd5b8286015b84811015612ce55780358352918301918301612cce565b509695505050505050565b600080600080600060a08688031215612d0857600080fd5b612d11866129b9565b9450612d1f602087016129b9565b9350604086013567ffffffffffffffff80821115612d3c57600080fd5b612d4889838a01612c7f565b94506060880135915080821115612d5e57600080fd5b612d6a89838a01612c7f565b93506080880135915080821115612d8057600080fd5b50612d8d88828901612b72565b9150509295509295909350565b60008060408385031215612dad57600080fd5b823567ffffffffffffffff80821115612dc557600080fd5b818501915085601f830112612dd957600080fd5b81356020612de682612c5b565b604051612df38282612a7b565b83815260059390931b8501820192828101915089841115612e1357600080fd5b948201945b83861015612e3857612e29866129b9565b82529482019490820190612e18565b96505086013592505080821115612e4e57600080fd5b50612e5b85828601612c7f565b9150509250929050565b600081518084526020808501945080840160005b83811015612e9557815187529582019590820190600101612e79565b509495945050505050565b6020815260006109746020830184612e65565b60008060008060808587031215612ec957600080fd5b612ed2856129b9565b93506020850135925060408501359150606085013567ffffffffffffffff811115612efc57600080fd5b612f0887828801612b72565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b82811015612f565781516001600160a01b031684529284019290840190600101612f31565b50505083810382850152612f6a8186612e65565b9695505050505050565b60008060408385031215612f8757600080fd5b612f90836129b9565b915060208301358015158114612fa557600080fd5b809150509250929050565b60008060008060808587031215612fc657600080fd5b612fcf856129b9565b9350602085013567ffffffffffffffff80821115612fec57600080fd5b612ff888838901612c7f565b9450604087013591508082111561300e57600080fd5b61301a88838901612c7f565b9350606087013591508082111561303057600080fd5b50612f0887828801612b72565b6000806040838503121561305057600080fd5b613059836129b9565b9150613067602084016129b9565b90509250929050565b600080600080600060a0868803121561308857600080fd5b613091866129b9565b945061309f602087016129b9565b93506040860135925060608601359150608086013567ffffffffffffffff8111156130c957600080fd5b612d8d88828901612b72565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761051e5761051e6130eb565b6000600019820361312b5761312b6130eb565b5060010190565b600181811c9082168061314657607f821691505b60208210810361316657634e487b7160e01b600052602260045260246000fd5b50919050565b8181038181111561051e5761051e6130eb565b60008161318e5761318e6130eb565b506000190190565b601f82111561065e57600081815260208120601f850160051c810160208610156131bd5750805b601f850160051c820191505b8181101561177e578281556001016131c9565b815167ffffffffffffffff8111156131f6576131f6612a65565b61320a816132048454613132565b84613196565b602080601f83116001811461323f57600084156132275750858301515b600019600386901b1c1916600185901b17855561177e565b600085815260208120601f198616915b8281101561326e5788860151825594840194600190910190840161324f565b508582101561328c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561051e5761051e6130eb565b6040815260006132c26040830185612e65565b82810360208401526132d48185612e65565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261330960a0830186612e65565b828103606084015261331b8186612e65565b9050828103608084015261332f8185612c02565b98975050505050505050565b60006020828403121561334d57600080fd5b8151610974816129ff565b600060033d11156133715760046000803e5060005160e01c5b90565b600060443d10156133825790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff81602484011181841117156133d057505050505090565b82850191508151818111156133e85750505050505090565b843d87010160208285010111156134025750505050505090565b61341160208286010187612a7b565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261345460a0830184612c02565b97965050505050505056fea264697066735822122022c8b8310c542bf0dac7b9713f07ae5085d099fbd6a4c455380098a30d2ca1ba64736f6c63430008140033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638b81c63911610104578063b5674c68116100a2578063f242432a11610071578063f242432a1461041f578063f2fde38b14610432578063f5298aca14610445578063f8f88dc21461045857600080fd5b8063b5674c68146103b5578063e2ab691d146103c8578063e8a3d485146103db578063e985e9c5146103e357600080fd5b806399d50d5d116100de57806399d50d5d14610350578063a22cb46514610366578063a89027f814610379578063b48ab8b6146103a257600080fd5b80638b81c639146103195780638da5cb5b1461032c578063938e3d7b1461033d57600080fd5b80632eb2c2d6116101715780635c87c8f91161014b5780635c87c8f9146102d0578063715018a6146102f5578063731133e9146102fd5780638215eccd1461031057600080fd5b80632eb2c2d61461028a578063468b3b331461029d5780634e1273f4146102b057600080fd5b806302fe5305116101ad57806302fe53051461023157806305917eee146102445780630dbaf77f146102575780630e89341c1461026a57600080fd5b8062fdd58e146101d357806301ffc9a7146101f9578063022b23d51461021c575b600080fd5b6101e66101e13660046129d5565b610478565b6040519081526020015b60405180910390f35b61020c610207366004612a15565b610524565b60405190151581526020016101f0565b61022f61022a366004612a32565b610562565b005b61022f61023f366004612b06565b610663565b61022f610252366004612b57565b610677565b61022f610265366004612b92565b610737565b61027d610278366004612be9565b610806565b6040516101f09190612c48565b61022f610298366004612cf0565b61089a565b6101e66102ab3660046129d5565b61093c565b6102c36102be366004612d9a565b61097b565b6040516101f09190612ea0565b600a546001600160a01b03165b6040516001600160a01b0390911681526020016101f0565b61022f610ab9565b61022f61030b366004612eb3565b610acd565b6101e660095481565b6101e66103273660046129d5565b610b43565b6006546001600160a01b03166102dd565b61022f61034b366004612b06565b610b86565b610358610b9e565b6040516101f0929190612f14565b61022f610374366004612f74565b610c5b565b6101e6610387366004612b57565b6001600160a01b031660009081526008602052604090205490565b61022f6103b0366004612fb0565b610c66565b61022f6103c3366004612a32565b610e12565b61022f6103d6366004612a32565b610e81565b61027d610ef0565b61020c6103f136600461303d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61022f61042d366004613070565b610f82565b61022f610440366004612b57565b61101d565b61022f610453366004612a32565b6110aa565b6101e6610466366004612b57565b60086020526000908152604090205481565b60006001600160a01b0383166104fb5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982167fb0262bf600000000000000000000000000000000000000000000000000000000148061051e575061051e82611143565b60005b6004548110156106525760048181548110610582576105826130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663b5674c688585600585815481106105c3576105c36130d5565b9060005260206000200154866105d99190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561062757600080fd5b505af115801561063b573d6000803e3d6000fd5b50505050808061064a90613118565b915050610565565b5061065e8383836111de565b505050565b61066b6112da565b61067481611334565b50565b61067f6112da565b6001600160a01b0381166106d55760405162461bcd60e51b815260206004820152601d60248201527f6d75737420737065636966792072616e6b696e6720696e7374616e636500000060448201526064016104f2565b600a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f6a0707879bc3853a8fcf9dbebe74a41dd8ea34813c262a58f1f99038559d1e2190600090a250565b6001600160a01b0383163314806107585750600a546001600160a01b031633145b6107a45760405162461bcd60e51b815260206004820152601660248201527f6c6576656c55703a204e6f74207065726d69747465640000000000000000000060448201526064016104f2565b6107b18383600b546111de565b6107be8360018484611340565b826001600160a01b03167f91e51c29e7e87a74ad3b8ccba98538970f50a4309242735467f41e27c6b0fbac836040516107f991815260200190565b60405180910390a2505050565b60606002805461081590613132565b80601f016020809104026020016040519081016040528092919081815260200182805461084190613132565b801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806108b657506108b685336103f1565b6109285760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b61093585858585856114cc565b5050505050565b6001600160a01b038216600090815260036020908152604080832084845290915281205461096a8484610478565b610974919061316c565b9392505050565b606081518351146109f45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016104f2565b6000835167ffffffffffffffff811115610a1057610a10612a65565b604051908082528060200260200182016040528015610a39578160200160208202803683370190505b50905060005b8451811015610ab157610a84858281518110610a5d57610a5d6130d5565b6020026020010151858381518110610a7757610a776130d5565b6020026020010151610478565b828281518110610a9657610a966130d5565b6020908102919091010152610aaa81613118565b9050610a3f565b509392505050565b610ac16112da565b610acb6000611786565b565b600a546001600160a01b03163314610b315760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b610b3d84848484611340565b50505050565b6000815b8015610b7c576000610b598583610478565b90508015610b695750905061051e565b5080610b748161317f565b915050610b47565b5060009392505050565b610b8e6112da565b6007610b9a82826131dc565b5050565b6060806004600581805480602002602001604051908101604052809291908181526020018280548015610bfa57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bdc575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610c4c57602002820191906000526020600020905b815481526020019060010190808311610c38575b50505050509050915091509091565b610b9a3383836117f0565b600a546001600160a01b03163314610cca5760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b6001600160a01b038416610d2f5760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b8151600003610da65760405162461bcd60e51b815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f696669656400000000000000000000000000000000000000000000000000000060648201526084016104f2565b8251600003610e065760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b610b3d84848484611903565b600a546001600160a01b03163314610e765760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b61065e838383611b18565b600a546001600160a01b03163314610ee55760405162461bcd60e51b815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f207468616044820152601d60fa1b60648201526084016104f2565b61065e838383611c08565b606060078054610eff90613132565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b90613132565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b5050505050905090565b6001600160a01b038516331480610f9e5750610f9e85336103f1565b6110105760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b6109358585858585611d0c565b6110256112da565b6001600160a01b0381166110a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104f2565b61067481611786565b6001600160a01b0383163314806110c657506110c683336103f1565b6111385760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f76656400000000000000000000000000000000000060648201526084016104f2565b61065e8383836111de565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806111a657506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061051e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461051e565b60005b6004548110156112ce57600481815481106111fe576111fe6130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663f5298aca85856005858154811061123f5761123f6130d5565b9060005260206000200154866112559190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b1580156112a357600080fd5b505af11580156112b7573d6000803e3d6000fd5b5050505080806112c690613118565b9150506111e1565b5061065e838383611efe565b6006546001600160a01b03163314610acb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f2565b6002610b9a82826131dc565b6001600160a01b0384166113a55760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b8260000361141b5760405162461bcd60e51b815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f696669656400000000000000000000000000000000000000000000000000000060648201526084016104f2565b8160000361147a5760405162461bcd60e51b815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201526518da599a595960d21b60648201526084016104f2565b6009548211156114c057600982905560405182906001600160a01b038616907f05c066fccc179a1b704e61617b73bc27a30a3162d36704cb8d4305064471a24090600090a35b610b3d848385846120d4565b81518351146115435760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0384166115bf5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104f2565b336115ce8187878787876121d1565b60005b845181101561170a5760008582815181106115ee576115ee6130d5565b60200260200101519050600085838151811061160c5761160c6130d5565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116b25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016104f2565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906116ef90849061329c565b925050819055505050508061170390613118565b90506115d1565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161175a9291906132af565b60405180910390a4611770818787878787612318565b61177e8187878787876124fa565b505050505050565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036118775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6001600160a01b03841661197f5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b81518351146119f65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016104f2565b33611a06816000878787876121d1565b60005b8451811015611aa157838181518110611a2457611a246130d5565b6020026020010151600080878481518110611a4157611a416130d5565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611a89919061329c565b90915550819050611a9981613118565b915050611a09565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611af29291906132af565b60405180910390a4611b0981600087878787612318565b610935816000878787876124fa565b6001600160a01b0383166000908152600360209081526040808320858452909152902054811115611b93576001600160a01b0383166000908152600360209081526040808320858452909152908190205490516331303bbb60e01b8152600481018490526024810191909152604481018290526064016104f2565b6001600160a01b038316600090815260036020908152604080832085845290915281208054839290611bc690849061316c565b909155505060405181815282906001600160a01b038516907f89882ad382a3742d4db24e4dabc5000c5852aed762904db28442e4e1630a1d07906020016118f6565b6001600160a01b0383166000908152600360209081526040808320858452909152902054611c3790829061329c565b611c418484610478565b1015611c97576001600160a01b0383166000908152600360209081526040808320858452909152908190205490516331303bbb60e01b8152600481018490526024810191909152604481018290526064016104f2565b6001600160a01b038316600090815260036020908152604080832085845290915281208054839290611cca90849061329c565b909155505060405181815282906001600160a01b038516907fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d906020016118f6565b6001600160a01b038416611d885760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104f2565b336000611d94856126e6565b90506000611da1856126e6565b9050611db18389898585896121d1565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611e485760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016104f2565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611e8590849061329c565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611ee5848a8a86868a612318565b611ef3848a8a8a8a8a612731565b505050505050505050565b6001600160a01b038316611f7a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b336000611f86846126e6565b90506000611f93846126e6565b9050611fb3838760008585604051806020016040528060008152506121d1565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156120495760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016104f2565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120cb84886000868660405180602001604052806000815250612318565b50505050505050565b60005b6004548110156121c457600481815481106120f4576120f46130d5565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663e2ab691d868660058581548110612135576121356130d5565b90600052602060002001548761214b9190613101565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561219957600080fd5b505af11580156121ad573d6000803e3d6000fd5b5050505080806121bc90613118565b9150506120d7565b50610b3d84848484612874565b60005b8351811015612312576001600160a01b038616156123005761220286858381518110610a7757610a776130d5565b838281518110612214576122146130d5565b602002602001015160036000896001600160a01b03166001600160a01b031681526020019081526020016000206000878581518110612255576122556130d5565b6020026020010151815260200190815260200160002054612276919061329c565b11156123005783818151811061228e5761228e6130d5565b60200260200101516122b9878684815181106122ac576122ac6130d5565b602002602001015161093c565b8483815181106122cb576122cb6130d5565b60200260200101516040516331303bbb60e01b81526004016104f2939291909283526020830191909152604082015260600190565b8061230a81613118565b9150506121d4565b5061177e565b60005b83518110156120cb57838181518110612336576123366130d5565b602002602001015160086000876001600160a01b03166001600160a01b031681526020019081526020016000205410801561238b575082818151811061237e5761237e6130d5565b6020026020010151600014155b15612424578381815181106123a2576123a26130d5565b602002602001015160086000876001600160a01b03166001600160a01b03168152602001908152602001600020819055508381815181106123e5576123e56130d5565b6020026020010151856001600160a01b03167f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb760405160405180910390a35b6001600160a01b0386161580159061247757506001600160a01b03861660009081526008602052604090205461245b908790610b43565b6001600160a01b03871660009081526008602052604090205414155b156124e8576001600160a01b0386166000908152600860205260408120546124a0908890610b43565b6001600160a01b0388166000818152600860205260408082208490555192935083927f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb79190a3505b806124f281613118565b91505061231b565b6001600160a01b0384163b1561177e576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c819061255790899089908890889088906004016132dd565b6020604051808303816000875af1925050508015612592575060408051601f3d908101601f1916820190925261258f9181019061333b565b60015b6126475761259e613358565b806308c379a0036125d757506125b2613374565b806125bd57506125d9565b8060405162461bcd60e51b81526004016104f29190612c48565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016104f2565b6001600160e01b031981167fbc197c8100000000000000000000000000000000000000000000000000000000146120cb5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016104f2565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612720576127206130d5565b602090810291909101015292915050565b6001600160a01b0384163b1561177e576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e619061278e908990899088908890889060040161341c565b6020604051808303816000875af19250505080156127c9575060408051601f3d908101601f191682019092526127c69181019061333b565b60015b6127d55761259e613358565b6001600160e01b031981167ff23a6e6100000000000000000000000000000000000000000000000000000000146120cb5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016104f2565b6001600160a01b0384166128f05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104f2565b3360006128fc856126e6565b90506000612909856126e6565b905061291a836000898585896121d1565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061294a90849061329c565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46129aa83600089858589612318565b6120cb83600089898989612731565b80356001600160a01b03811681146129d057600080fd5b919050565b600080604083850312156129e857600080fd5b6129f1836129b9565b946020939093013593505050565b6001600160e01b03198116811461067457600080fd5b600060208284031215612a2757600080fd5b8135610974816129ff565b600080600060608486031215612a4757600080fd5b612a50846129b9565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715612aa157612aa1612a65565b6040525050565b600067ffffffffffffffff831115612ac257612ac2612a65565b604051612ad96020601f19601f8701160182612a7b565b809150838152848484011115612aee57600080fd5b83836020830137600060208583010152509392505050565b600060208284031215612b1857600080fd5b813567ffffffffffffffff811115612b2f57600080fd5b8201601f81018413612b4057600080fd5b612b4f84823560208401612aa8565b949350505050565b600060208284031215612b6957600080fd5b610974826129b9565b600082601f830112612b8357600080fd5b61097483833560208501612aa8565b600080600060608486031215612ba757600080fd5b612bb0846129b9565b925060208401359150604084013567ffffffffffffffff811115612bd357600080fd5b612bdf86828701612b72565b9150509250925092565b600060208284031215612bfb57600080fd5b5035919050565b6000815180845260005b81811015612c2857602081850181015186830182015201612c0c565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006109746020830184612c02565b600067ffffffffffffffff821115612c7557612c75612a65565b5060051b60200190565b600082601f830112612c9057600080fd5b81356020612c9d82612c5b565b604051612caa8282612a7b565b83815260059390931b8501820192828101915086841115612cca57600080fd5b8286015b84811015612ce55780358352918301918301612cce565b509695505050505050565b600080600080600060a08688031215612d0857600080fd5b612d11866129b9565b9450612d1f602087016129b9565b9350604086013567ffffffffffffffff80821115612d3c57600080fd5b612d4889838a01612c7f565b94506060880135915080821115612d5e57600080fd5b612d6a89838a01612c7f565b93506080880135915080821115612d8057600080fd5b50612d8d88828901612b72565b9150509295509295909350565b60008060408385031215612dad57600080fd5b823567ffffffffffffffff80821115612dc557600080fd5b818501915085601f830112612dd957600080fd5b81356020612de682612c5b565b604051612df38282612a7b565b83815260059390931b8501820192828101915089841115612e1357600080fd5b948201945b83861015612e3857612e29866129b9565b82529482019490820190612e18565b96505086013592505080821115612e4e57600080fd5b50612e5b85828601612c7f565b9150509250929050565b600081518084526020808501945080840160005b83811015612e9557815187529582019590820190600101612e79565b509495945050505050565b6020815260006109746020830184612e65565b60008060008060808587031215612ec957600080fd5b612ed2856129b9565b93506020850135925060408501359150606085013567ffffffffffffffff811115612efc57600080fd5b612f0887828801612b72565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b82811015612f565781516001600160a01b031684529284019290840190600101612f31565b50505083810382850152612f6a8186612e65565b9695505050505050565b60008060408385031215612f8757600080fd5b612f90836129b9565b915060208301358015158114612fa557600080fd5b809150509250929050565b60008060008060808587031215612fc657600080fd5b612fcf856129b9565b9350602085013567ffffffffffffffff80821115612fec57600080fd5b612ff888838901612c7f565b9450604087013591508082111561300e57600080fd5b61301a88838901612c7f565b9350606087013591508082111561303057600080fd5b50612f0887828801612b72565b6000806040838503121561305057600080fd5b613059836129b9565b9150613067602084016129b9565b90509250929050565b600080600080600060a0868803121561308857600080fd5b613091866129b9565b945061309f602087016129b9565b93506040860135925060608601359150608086013567ffffffffffffffff8111156130c957600080fd5b612d8d88828901612b72565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761051e5761051e6130eb565b6000600019820361312b5761312b6130eb565b5060010190565b600181811c9082168061314657607f821691505b60208210810361316657634e487b7160e01b600052602260045260246000fd5b50919050565b8181038181111561051e5761051e6130eb565b60008161318e5761318e6130eb565b506000190190565b601f82111561065e57600081815260208120601f850160051c810160208610156131bd5750805b601f850160051c820191505b8181101561177e578281556001016131c9565b815167ffffffffffffffff8111156131f6576131f6612a65565b61320a816132048454613132565b84613196565b602080601f83116001811461323f57600084156132275750858301515b600019600386901b1c1916600185901b17855561177e565b600085815260208120601f198616915b8281101561326e5788860151825594840194600190910190840161324f565b508582101561328c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561051e5761051e6130eb565b6040815260006132c26040830185612e65565b82810360208401526132d48185612e65565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261330960a0830186612e65565b828103606084015261331b8186612e65565b9050828103608084015261332f8185612c02565b98975050505050505050565b60006020828403121561334d57600080fd5b8151610974816129ff565b600060033d11156133715760046000803e5060005160e01c5b90565b600060443d10156133825790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff81602484011181841117156133d057505050505090565b82850191508151818111156133e85750505050505090565b843d87010160208285010111156134025750505050505090565b61341160208286010187612a7b565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261345460a0830184612c02565b97965050505050505056fea264697066735822122022c8b8310c542bf0dac7b9713f07ae5085d099fbd6a4c455380098a30d2ca1ba64736f6c63430008140033", + "solcInputHash": "af20401871b7f4e560e69ce739339e01", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"cURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"levelUpThreshold\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"components\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"componentWeights\",\"type\":\"uint256[]\"}],\"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\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"Leader\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"LevelUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"RankUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRankingInstance\",\"type\":\"address\"}],\"name\":\"RankingInstanceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TokensLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TokensUnlocked\",\"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\":[{\"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\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"batchMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decompose\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oldRank\",\"type\":\"uint256\"}],\"name\":\"findNewRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComponents\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRankingInstance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"level\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"levelUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"level\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"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\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setContractURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unlockedBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRankingInstance\",\"type\":\"address\"}],\"name\":\"updateRankingInstance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`.\"},\"TransferBatch(address,address,address,uint256[],uint256[])\":{\"details\":\"Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers.\"},\"TransferSingle(address,address,address,uint256,uint256)\":{\"details\":\"Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\"},\"URI(string,uint256)\":{\"details\":\"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}.\"}},\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"batchMint(address,uint256[],uint256[],bytes)\":{\"details\":\"Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\"},\"burn(address,uint256,uint256)\":{\"details\":\"Burns a specified amount of tokens from the given account. This will burn all underlying (composite) assets Requirements: - `account` must be the token owner or an approved operator. - `id` and `value` must be valid token ID and amount to burn. - All underlying \\\"composite\\\" assets implement burn as well\",\"params\":{\"account\":\"The address of the token owner.\",\"id\":\"The ID of the token to burn.\",\"value\":\"The amount of tokens to burn.\"}},\"decompose(address,uint256,uint256)\":{\"details\":\"Decomposes a composite ERC1155 token into its individual components. This function unlocks the specified amount of the composite token from each dimension, and then burns the specified amount of the composite token from the caller's balance.\",\"params\":{\"amount\":\"The amount of the composite token to decompose.\",\"from\":\"The address from which the composite token is being decomposed.\",\"id\":\"The ID of the composite token being decomposed.\"}},\"findNewRank(address,uint256)\":{\"details\":\"Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account. It checks the balance of the account and returns the new rank that can be upgraded to. Returns: - The new rank of the account.\"},\"getAccountRank(address)\":{\"details\":\"Gets the rank of an account. `account` is the address of the account. Returns: - The rank of the account.\"},\"getComponents()\":{\"details\":\"Retrieves the components of the CompositeERC1155 contract.\",\"returns\":{\"_0\":\"An array of component addresses and an array of component weights.\"}},\"getRankingInstance()\":{\"details\":\"Gets the ranking instance which can emit new rank updates and mint rank tokens. Returns: - The address of the ranking instance.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlockedBalanceOf(address,uint256)\":{\"details\":\"Returns the unlocked balance of a specific ERC1155 token for an account. The unlocked balance is calculated by subtracting the locked amount from the total balance.\",\"params\":{\"account\":\"The address of the account.\",\"id\":\"The ID of the ERC1155 token.\"},\"returns\":{\"_0\":\"The unlocked balance of the ERC1155 token for the account.\"}},\"updateRankingInstance(address)\":{\"details\":\"Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance. emits a _RankingInstanceUpdated_ event.\"},\"uri(uint256)\":{\"details\":\"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.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/tokens/RankToken.sol\":\"RankToken\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/CompositeERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"./LockableERC1155.sol\\\";\\n\\n/**\\n * @title CompositeERC1155\\n * @dev An abstract contract that extends LockableERC1155 and provides functionality for composite ERC1155 tokens.\\n * Composite tokens can be \\\"composed\\\" from multiple underlying assets, which however do not change their owner\\n * and in contrast to that use LockableERC1155 standard, which allows to read locked asset BalanceOf, OwnerOf methods correctly\\n */\\nabstract contract CompositeERC1155 is LockableERC1155 {\\n address[] private dimensions;\\n uint256[] private weights;\\n\\n constructor(string memory uri_, address[] memory dimensionTokens, uint256[] memory tokenWeights) ERC1155(uri_) {\\n require(dimensionTokens.length == tokenWeights.length, \\\"Array lengths must be equal\\\");\\n dimensions = dimensionTokens;\\n weights = tokenWeights;\\n }\\n\\n function _mint(address to, uint256 tokenId, uint256 value, bytes memory data) internal virtual override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).lock(to, tokenId, value * weights[i]);\\n }\\n super._mint(to, tokenId, value, data);\\n }\\n\\n function _burn(address from, uint256 id, uint256 amount) internal override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n CompositeERC1155(dimensions[i]).burn(from, id, amount * weights[i]);\\n }\\n super._burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Decomposes a composite ERC1155 token into its individual components.\\n * This function unlocks the specified amount of the composite token from each dimension,\\n * and then burns the specified amount of the composite token from the caller's balance.\\n * @param from The address from which the composite token is being decomposed.\\n * @param id The ID of the composite token being decomposed.\\n * @param amount The amount of the composite token to decompose.\\n */\\n function decompose(address from, uint256 id, uint256 amount) public virtual {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).unlock(from, id, amount * weights[i]);\\n }\\n _burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Burns a specified amount of tokens from the given account.\\n * This will burn all underlying (composite) assets\\n *\\n * Requirements:\\n * - `account` must be the token owner or an approved operator.\\n * - `id` and `value` must be valid token ID and amount to burn.\\n * - All underlying \\\"composite\\\" assets implement burn as well\\n *\\n * @param account The address of the token owner.\\n * @param id The ID of the token to burn.\\n * @param value The amount of tokens to burn.\\n */\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n /**\\n * @dev Retrieves the components of the CompositeERC1155 contract.\\n * @return An array of component addresses and an array of component weights.\\n */\\n function getComponents() public virtual returns (address[] memory, uint256[] memory) {\\n return (dimensions, weights);\\n }\\n}\\n\",\"keccak256\":\"0xad12acae82dd98d6d4375c7c4290667341cb43faa73c6381d9d20094b77fc29e\",\"license\":\"Apache-2.0\"},\"src/abstracts/LockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {ILockableERC1155} from \\\"../interfaces/ILockableERC1155.sol\\\";\\nerror insufficient(uint256 id, uint256 balance, uint256 required);\\n\\n/**\\n * @title LockableERC1155\\n * @dev This is an abstract contract that extends the ERC1155 token contract and implements the ILockableERC1155 interface.\\n * It provides functionality to lock and unlock token amounts for specific accounts and IDs.\\n */\\nabstract contract LockableERC1155 is ERC1155, ILockableERC1155 {\\n mapping(address => mapping(uint256 => uint256)) lockedAmounts;\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID.\\n * If the account does not have enough balance to lock the specified amount,\\n * the function will revert with an \\\"insufficient\\\" error message.\\n * Emits a `TokensLocked` event after successfully locking the tokens.\\n * @param account The address of the account to lock tokens for.\\n * @param id The ID of the token to lock.\\n * @param amount The amount of tokens to lock.\\n */\\n function lock(address account, uint256 id, uint256 amount) public virtual {\\n if (balanceOf(account, id) < lockedAmounts[account][id] + amount) require(false, \\\"insufficient\\\");\\n // revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] += amount;\\n emit TokensLocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID.\\n * If the locked amount is less than the specified amount, it reverts with an \\\"insufficient\\\" error message.\\n * Emits a `TokensUnlocked` event after unlocking the tokens.\\n * @param account The address of the account to unlock tokens for.\\n * @param id The ID of the token to unlock.\\n * @param amount The amount of tokens to unlock.\\n */\\n function unlock(address account, uint256 id, uint256 amount) public virtual {\\n if (lockedAmounts[account][id] < amount) require(false, \\\"insufficient\\\"); //revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] -= amount;\\n emit TokensUnlocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Returns the unlocked balance of a specific ERC1155 token for an account.\\n * The unlocked balance is calculated by subtracting the locked amount from the total balance.\\n * @param account The address of the account.\\n * @param id The ID of the ERC1155 token.\\n * @return The unlocked balance of the ERC1155 token for the account.\\n */\\n function unlockedBalanceOf(address account, uint256 id) public view returns (uint256) {\\n return balanceOf(account, id) - lockedAmounts[account][id];\\n }\\n\\n /**\\n * @dev Hook function that is called before any token transfer.\\n * It checks if the transfer is allowed based on the locked amounts of the tokens.\\n * If the transfer is not allowed, it reverts with an error message.\\n * @param operator The address performing the token transfer.\\n * @param from The address from which the tokens are being transferred.\\n * @param to The address to which the tokens are being transferred.\\n * @param ids An array of token IDs being transferred.\\n * @param amounts An array of token amounts being transferred.\\n * @param data Additional data attached to the transfer.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (from != address(0)) {\\n if (lockedAmounts[from][ids[i]] + amounts[i] > balanceOf(from, ids[i])) {\\n require(false, \\\"insufficient\\\");\\n }\\n }\\n }\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x68f61e7bf0aa1edf0c1fbe58004a67856521d882c272542e81b48ebe5a16caca\",\"license\":\"Apache-2.0\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef038fdedc9d4857f9f190562c07849c9813fd4ae927a4e81cef94a29a3f5ed\",\"license\":\"MIT\"},\"src/tokens/RankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/CompositeERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\npragma solidity ^0.8.20;\\n\\ncontract RankToken is CompositeERC1155, Ownable, IRankToken {\\n string private _contractURI;\\n mapping(address => uint256) public rank;\\n uint256 public topRank;\\n address private _rankingInstance;\\n uint256 _levelUpThreshold;\\n\\n modifier onlyRankingInstance() {\\n require(msg.sender == _rankingInstance, \\\"only ranking contract can do that\\\");\\n _;\\n }\\n\\n constructor(\\n string memory uri_,\\n address owner_,\\n string memory cURI,\\n uint256 levelUpThreshold,\\n address[] memory components,\\n uint256[] memory componentWeights\\n ) CompositeERC1155(uri_, components, componentWeights) {\\n require(owner_ != address(0), \\\"must specify owner of the contract\\\");\\n _contractURI = cURI;\\n _levelUpThreshold = levelUpThreshold;\\n transferOwnership(owner_);\\n }\\n\\n function getRankingInstance() public view returns (address) {\\n return _rankingInstance;\\n }\\n\\n function contractURI() public view returns (string memory) {\\n return _contractURI;\\n }\\n\\n function setURI(string memory uri_) public onlyOwner {\\n _setURI(uri_);\\n }\\n\\n function setContractURI(string memory uri_) public onlyOwner {\\n _contractURI = uri_;\\n }\\n\\n event Leader(address indexed account, uint256 indexed rank);\\n\\n function _mintRank(address to, uint256 amount, uint256 level, bytes memory data) private {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amount != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(level != 0, \\\"RankToken->mint: pool id not specified\\\");\\n if (level > topRank) {\\n topRank = level;\\n emit Leader(to, level);\\n }\\n _mint(to, level, amount, data);\\n }\\n\\n function mint(address to, uint256 amount, uint256 level, bytes memory data) public onlyRankingInstance {\\n _mintRank(to, amount, level, data);\\n }\\n\\n function updateRankingInstance(address newRankingInstance) public onlyOwner {\\n require(newRankingInstance != address(0), \\\"must specify ranking instance\\\");\\n _rankingInstance = newRankingInstance;\\n emit RankingInstanceUpdated(newRankingInstance);\\n }\\n\\n function lock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.lock(account, id, amount);\\n }\\n\\n function unlock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.unlock(account, id, amount);\\n }\\n\\n function batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public onlyRankingInstance {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amounts.length != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(ids.length != 0, \\\"RankToken->mint: pool id not specified\\\");\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function levelUp(address to, uint256 level, bytes memory data) public {\\n require(to == msg.sender || msg.sender == _rankingInstance, \\\"levelUp: Not permitted\\\");\\n _burn(to, level, _levelUpThreshold);\\n _mintRank(to, 1, level, data);\\n emit LevelUp(to, level);\\n }\\n\\n function findNewRank(address account, uint256 oldRank) public view returns (uint256) {\\n for (uint256 i = oldRank; i > 0; i--) {\\n uint256 _balanceTemp = balanceOf(account, i);\\n if (_balanceTemp > 0) return i;\\n }\\n return 0;\\n }\\n\\n event RankUpdated(address indexed account, uint256 indexed rank);\\n\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (rank[to] < ids[i] && amounts[i] != 0) {\\n rank[to] = ids[i];\\n emit RankUpdated(to, ids[i]);\\n }\\n if (from != address(0) && (rank[from] != findNewRank(from, rank[from]))) {\\n uint256 newRankFrom = findNewRank(from, rank[from]);\\n rank[from] = newRankFrom;\\n emit RankUpdated(from, newRankFrom);\\n }\\n\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n }\\n\\n //ToDo: Rename in to rankOf(address account)\\n function getAccountRank(address account) external view returns (uint256) {\\n return rank[account];\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC1155) returns (bool) {\\n return interfaceId == type(IRankToken).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x2a333824a5509334058ab6ac8d92fb32a04436f9e15aca1ea1de60647996f7f5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200477b3803806200477b83398101604081905262000034916200056d565b85828282620000438162000172565b5080518251146200009b5760405162461bcd60e51b815260206004820152601b60248201527f4172726179206c656e67746873206d75737420626520657175616c000000000060448201526064015b60405180910390fd5b8151620000b0906004906020850190620002b7565b508051620000c690600590602084019062000321565b50505050620000e4620000de6200018460201b60201c565b62000188565b6001600160a01b038516620001475760405162461bcd60e51b815260206004820152602260248201527f6d7573742073706563696679206f776e6572206f662074686520636f6e74726160448201526118dd60f21b606482015260840162000092565b6007620001558582620006d0565b50600b8390556200016685620001da565b5050505050506200079c565b6002620001808282620006d0565b5050565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001e462000259565b6001600160a01b0381166200024b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000092565b620002568162000188565b50565b6006546001600160a01b03163314620002b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000092565b565b8280548282559060005260206000209081019282156200030f579160200282015b828111156200030f57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002d8565b506200031d9291506200035f565b5090565b8280548282559060005260206000209081019282156200030f579160200282015b828111156200030f57825182559160200191906001019062000342565b5b808211156200031d576000815560010162000360565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620003b757620003b762000376565b604052919050565b600082601f830112620003d157600080fd5b81516001600160401b03811115620003ed57620003ed62000376565b602062000403601f8301601f191682016200038c565b82815285828487010111156200041857600080fd5b60005b83811015620004385785810183015182820184015282016200041b565b506000928101909101919091529392505050565b80516001600160a01b03811681146200046457600080fd5b919050565b60006001600160401b0382111562000485576200048562000376565b5060051b60200190565b600082601f830112620004a157600080fd5b81516020620004ba620004b48362000469565b6200038c565b82815260059290921b84018101918181019086841115620004da57600080fd5b8286015b848110156200050057620004f2816200044c565b8352918301918301620004de565b509695505050505050565b600082601f8301126200051d57600080fd5b8151602062000530620004b48362000469565b82815260059290921b840181019181810190868411156200055057600080fd5b8286015b8481101562000500578051835291830191830162000554565b60008060008060008060c087890312156200058757600080fd5b86516001600160401b03808211156200059f57600080fd5b620005ad8a838b01620003bf565b9750620005bd60208a016200044c565b96506040890151915080821115620005d457600080fd5b620005e28a838b01620003bf565b95506060890151945060808901519150808211156200060057600080fd5b6200060e8a838b016200048f565b935060a08901519150808211156200062557600080fd5b506200063489828a016200050b565b9150509295509295509295565b600181811c908216806200065657607f821691505b6020821081036200067757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006cb57600081815260208120601f850160051c81016020861015620006a65750805b601f850160051c820191505b81811015620006c757828155600101620006b2565b5050505b505050565b81516001600160401b03811115620006ec57620006ec62000376565b6200070481620006fd845462000641565b846200067d565b602080601f8311600181146200073c5760008415620007235750858301515b600019600386901b1c1916600185901b178555620006c7565b600085815260208120601f198616915b828110156200076d578886015182559484019460019091019084016200074c565b50858210156200078c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613fcf80620007ac6000396000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638b81c63911610104578063b5674c68116100a2578063f242432a11610071578063f242432a14610460578063f2fde38b14610473578063f5298aca14610486578063f8f88dc21461049957600080fd5b8063b5674c68146103e9578063e2ab691d146103fc578063e8a3d4851461040f578063e985e9c51461041757600080fd5b806399d50d5d116100de57806399d50d5d14610377578063a22cb4651461038d578063a89027f8146103a0578063b48ab8b6146103d657600080fd5b80638b81c639146103335780638da5cb5b14610346578063938e3d7b1461036457600080fd5b80632eb2c2d6116101715780635c87c8f91161014b5780635c87c8f9146102d0578063715018a61461030f578063731133e9146103175780638215eccd1461032a57600080fd5b80632eb2c2d61461028a578063468b3b331461029d5780634e1273f4146102b057600080fd5b806302fe5305116101ad57806302fe53051461023157806305917eee146102445780630dbaf77f146102575780630e89341c1461026a57600080fd5b8062fdd58e146101d357806301ffc9a7146101f9578063022b23d51461021c575b600080fd5b6101e66101e136600461337c565b6104b9565b6040519081526020015b60405180910390f35b61020c6102073660046133d4565b610599565b60405190151581526020016101f0565b61022f61022a3660046133f1565b6105ef565b005b61022f61023f36600461351a565b61072f565b61022f61025236600461356b565b610743565b61022f6102653660046135a6565b610837565b61027d6102783660046135fd565b610947565b6040516101f0919061367a565b61022f610298366004613722565b6109db565b6101e66102ab36600461337c565b610aa4565b6102c36102be3660046137cc565b610af0565b6040516101f091906138d2565b600a5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b61022f610c48565b61022f6103253660046138e5565b610c5c565b6101e660095481565b6101e661034136600461337c565b610d15565b60065473ffffffffffffffffffffffffffffffffffffffff166102ea565b61022f61037236600461351a565b610d58565b61037f610d70565b6040516101f0929190613946565b61022f61039b3660046139b3565b610e3a565b6101e66103ae36600461356b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526008602052604090205490565b61022f6103e43660046139ef565b610e45565b61022f6103f73660046133f1565b6110bd565b61022f61040a3660046133f1565b61116f565b61027d611221565b61020c610425366004613a7c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205460ff1690565b61022f61046e366004613aaf565b6112b3565b61022f61048136600461356b565b611375565b61022f6104943660046133f1565b611429565b6101e66104a736600461356b565b60086020526000908152604090205481565b600073ffffffffffffffffffffffffffffffffffffffff8316610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060008181526020818152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091529020545b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fb0262bf60000000000000000000000000000000000000000000000000000000014806105935750610593826114e9565b60005b60045481101561071e576004818154811061060f5761060f613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5674c6885856005858154811061066a5761066a613b14565b9060005260206000200154866106809190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b1580156106f357600080fd5b505af1158015610707573d6000803e3d6000fd5b50505050808061071690613b89565b9150506105f2565b5061072a8383836115cc565b505050565b610737611707565b61074081611788565b50565b61074b611707565b73ffffffffffffffffffffffffffffffffffffffff81166107c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d75737420737065636966792072616e6b696e6720696e7374616e6365000000604482015260640161055a565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f6a0707879bc3853a8fcf9dbebe74a41dd8ea34813c262a58f1f99038559d1e2190600090a250565b73ffffffffffffffffffffffffffffffffffffffff83163314806108725750600a5473ffffffffffffffffffffffffffffffffffffffff1633145b6108d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6c6576656c55703a204e6f74207065726d697474656400000000000000000000604482015260640161055a565b6108e58383600b546115cc565b6108f28360018484611794565b8273ffffffffffffffffffffffffffffffffffffffff167f91e51c29e7e87a74ad3b8ccba98538970f50a4309242735467f41e27c6b0fbac8360405161093a91815260200190565b60405180910390a2505050565b60606002805461095690613bc1565b80601f016020809104026020016040519081016040528092919081815260200182805461098290613bc1565b80156109cf5780601f106109a4576101008083540402835291602001916109cf565b820191906000526020600020905b8154815290600101906020018083116109b257829003601f168201915b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff8516331480610a045750610a048533610425565b610a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b610a9d85858585856119b6565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360209081526040808320848452909152812054610adf84846104b9565b610ae99190613c14565b9392505050565b60608151835114610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d617463680000000000000000000000000000000000000000000000606482015260840161055a565b6000835167ffffffffffffffff811115610b9f57610b9f613424565b604051908082528060200260200182016040528015610bc8578160200160208202803683370190505b50905060005b8451811015610c4057610c13858281518110610bec57610bec613b14565b6020026020010151858381518110610c0657610c06613b14565b60200260200101516104b9565b828281518110610c2557610c25613b14565b6020908102919091010152610c3981613b89565b9050610bce565b509392505050565b610c50611707565b610c5a6000611d0c565b565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610d03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b610d0f84848484611794565b50505050565b6000815b8015610d4e576000610d2b85836104b9565b90508015610d3b57509050610593565b5080610d4681613c27565b915050610d19565b5060009392505050565b610d60611707565b6007610d6c8282613ca2565b5050565b6060806004600581805480602002602001604051908101604052809291908181526020018280548015610dd957602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dae575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610e2b57602002820191906000526020600020905b815481526020019060010190808311610e17575b50505050509050915091509091565b610d6c338383611d83565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610eec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416610f8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b8151600003611020576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f6966696564000000000000000000000000000000000000000000000000000000606482015260840161055a565b82516000036110b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b610d0f84848484611ed7565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b61072a83838361216e565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b61072a838383612297565b60606007805461123090613bc1565b80601f016020809104026020016040519081016040528092919081815260200182805461125c90613bc1565b80156112a95780601f1061127e576101008083540402835291602001916112a9565b820191906000526020600020905b81548152906001019060200180831161128c57829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff85163314806112dc57506112dc8533610425565b611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b610a9d85858585856123d4565b61137d611707565b73ffffffffffffffffffffffffffffffffffffffff8116611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161055a565b61074081611d0c565b73ffffffffffffffffffffffffffffffffffffffff831633148061145257506114528333610425565b6114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b61072a8383836115cc565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000148061157c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061059357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610593565b60005b6004548110156116fb57600481815481106115ec576115ec613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f5298aca85856005858154811061164757611647613b14565b90600052602060002001548661165d9190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b1580156116d057600080fd5b505af11580156116e4573d6000803e3d6000fd5b5050505080806116f390613b89565b9150506115cf565b5061072a83838361262e565b60065473ffffffffffffffffffffffffffffffffffffffff163314610c5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161055a565b6002610d6c8282613ca2565b73ffffffffffffffffffffffffffffffffffffffff8416611837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b826000036118c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f6966696564000000000000000000000000000000000000000000000000000000606482015260840161055a565b81600003611957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b6009548211156119aa576009829055604051829073ffffffffffffffffffffffffffffffffffffffff8616907f05c066fccc179a1b704e61617b73bc27a30a3162d36704cb8d4305064471a24090600090a35b610d0f8483858461285f565b8151835114611a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416611aea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161055a565b33611af981878787878761299b565b60005b8451811015611c69576000858281518110611b1957611b19613b14565b602002602001015190506000858381518110611b3757611b37613b14565b6020908102919091018101516000848152808352604080822073ffffffffffffffffffffffffffffffffffffffff8e168352909352919091205490915081811015611c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161055a565b60008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8e8116855292528083208585039055908b16825281208054849290611c4e908490613dbc565b9250508190555050505080611c6290613b89565b9050611afc565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611ce0929190613dcf565b60405180910390a4611cf6818787878787612ae7565b611d04818787878787612d4b565b505050505050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c660000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8416611f7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b815183511461200b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161055a565b3361201b8160008787878761299b565b60005b84518110156120d05783818151811061203957612039613b14565b602002602001015160008087848151811061205657612056613b14565b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120b89190613dbc565b909155508190506120c881613b89565b91505061201e565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612148929190613dcf565b60405180910390a461215f81600087878787612ae7565b610a9d81600087878787612d4b565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360209081526040808320858452909152902054811115612208576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020908152604080832085845290915281208054839290612248908490613c14565b9091555050604051818152829073ffffffffffffffffffffffffffffffffffffffff8516907f89882ad382a3742d4db24e4dabc5000c5852aed762904db28442e4e1630a1d0790602001611eca565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602090815260408083208584529091529020546122d3908290613dbc565b6122dd84846104b9565b1015612345576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020908152604080832085845290915281208054839290612385908490613dbc565b9091555050604051818152829073ffffffffffffffffffffffffffffffffffffffff8516907fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d90602001611eca565b73ffffffffffffffffffffffffffffffffffffffff8416612477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161055a565b33600061248385612fd5565b9050600061249085612fd5565b90506124a083898985858961299b565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8c1684529091529020548581101561255e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161055a565b60008781526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8d8116855292528083208985039055908a168252812080548892906125a8908490613dbc565b9091555050604080518881526020810188905273ffffffffffffffffffffffffffffffffffffffff808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612615848a8a86868a612ae7565b612623848a8a8a8a8a613020565b505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166126d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161055a565b3360006126dd84612fd5565b905060006126ea84612fd5565b905061270a8387600085856040518060200160405280600081525061299b565b60008581526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8a168452909152902054848110156127c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e636500000000000000000000000000000000000000000000000000000000606482015260840161055a565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461285684886000868660405180602001604052806000815250612ae7565b50505050505050565b60005b60045481101561298e576004818154811061287f5761287f613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2ab691d8686600585815481106128da576128da613b14565b9060005260206000200154876128f09190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b15801561296357600080fd5b505af1158015612977573d6000803e3d6000fd5b50505050808061298690613b89565b915050612862565b50610d0f848484846131cd565b60005b8351811015612ae15773ffffffffffffffffffffffffffffffffffffffff861615612acf576129d986858381518110610c0657610c06613b14565b8382815181106129eb576129eb613b14565b6020026020010151600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878581518110612a4657612a46613b14565b6020026020010151815260200190815260200160002054612a679190613dbc565b1115612acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b80612ad981613b89565b91505061299e565b50611d04565b60005b835181101561285657838181518110612b0557612b05613b14565b6020026020010151600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054108015612b745750828181518110612b6757612b67613b14565b6020026020010151600014155b15612c3457838181518110612b8b57612b8b613b14565b6020026020010151600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550838181518110612be857612be8613b14565b60200260200101518573ffffffffffffffffffffffffffffffffffffffff167f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb760405160405180910390a35b73ffffffffffffffffffffffffffffffffffffffff861615801590612cae575073ffffffffffffffffffffffffffffffffffffffff8616600090815260086020526040902054612c85908790610d15565b73ffffffffffffffffffffffffffffffffffffffff871660009081526008602052604090205414155b15612d395773ffffffffffffffffffffffffffffffffffffffff8616600090815260086020526040812054612ce4908890610d15565b73ffffffffffffffffffffffffffffffffffffffff88166000818152600860205260408082208490555192935083927f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb79190a3505b80612d4381613b89565b915050612aea565b73ffffffffffffffffffffffffffffffffffffffff84163b15611d04576040517fbc197c8100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063bc197c8190612dc29089908990889088908890600401613dfd565b6020604051808303816000875af1925050508015612e1b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612e1891810190613e68565b60015b612f0457612e27613e85565b806308c379a003612e7a5750612e3b613ea1565b80612e465750612e7c565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a919061367a565b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e746572000000000000000000000000606482015260840161055a565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014612856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161055a565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061300f5761300f613b14565b602090810291909101015292915050565b73ffffffffffffffffffffffffffffffffffffffff84163b15611d04576040517ff23a6e6100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f23a6e61906130979089908990889088908890600401613f49565b6020604051808303816000875af19250505080156130f0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526130ed91810190613e68565b60015b6130fc57612e27613e85565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014612856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416613270576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b33600061327c85612fd5565b9050600061328985612fd5565b905061329a8360008985858961299b565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8b168452909152812080548792906132d7908490613dbc565b9091555050604080518781526020810187905273ffffffffffffffffffffffffffffffffffffffff808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461334483600089858589612ae7565b61285683600089898989613020565b803573ffffffffffffffffffffffffffffffffffffffff8116811461337757600080fd5b919050565b6000806040838503121561338f57600080fd5b61339883613353565b946020939093013593505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461074057600080fd5b6000602082840312156133e657600080fd5b8135610ae9816133a6565b60008060006060848603121561340657600080fd5b61340f84613353565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561349757613497613424565b6040525050565b600067ffffffffffffffff8311156134b8576134b8613424565b6040516134ed60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8701160182613453565b80915083815284848401111561350257600080fd5b83836020830137600060208583010152509392505050565b60006020828403121561352c57600080fd5b813567ffffffffffffffff81111561354357600080fd5b8201601f8101841361355457600080fd5b6135638482356020840161349e565b949350505050565b60006020828403121561357d57600080fd5b610ae982613353565b600082601f83011261359757600080fd5b610ae98383356020850161349e565b6000806000606084860312156135bb57600080fd5b6135c484613353565b925060208401359150604084013567ffffffffffffffff8111156135e757600080fd5b6135f386828701613586565b9150509250925092565b60006020828403121561360f57600080fd5b5035919050565b6000815180845260005b8181101561363c57602081850181015186830182015201613620565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ae96020830184613616565b600067ffffffffffffffff8211156136a7576136a7613424565b5060051b60200190565b600082601f8301126136c257600080fd5b813560206136cf8261368d565b6040516136dc8282613453565b83815260059390931b85018201928281019150868411156136fc57600080fd5b8286015b848110156137175780358352918301918301613700565b509695505050505050565b600080600080600060a0868803121561373a57600080fd5b61374386613353565b945061375160208701613353565b9350604086013567ffffffffffffffff8082111561376e57600080fd5b61377a89838a016136b1565b9450606088013591508082111561379057600080fd5b61379c89838a016136b1565b935060808801359150808211156137b257600080fd5b506137bf88828901613586565b9150509295509295909350565b600080604083850312156137df57600080fd5b823567ffffffffffffffff808211156137f757600080fd5b818501915085601f83011261380b57600080fd5b813560206138188261368d565b6040516138258282613453565b83815260059390931b850182019282810191508984111561384557600080fd5b948201945b8386101561386a5761385b86613353565b8252948201949082019061384a565b9650508601359250508082111561388057600080fd5b5061388d858286016136b1565b9150509250929050565b600081518084526020808501945080840160005b838110156138c7578151875295820195908201906001016138ab565b509495945050505050565b602081526000610ae96020830184613897565b600080600080608085870312156138fb57600080fd5b61390485613353565b93506020850135925060408501359150606085013567ffffffffffffffff81111561392e57600080fd5b61393a87828801613586565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b8281101561399557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101613963565b505050838103828501526139a98186613897565b9695505050505050565b600080604083850312156139c657600080fd5b6139cf83613353565b9150602083013580151581146139e457600080fd5b809150509250929050565b60008060008060808587031215613a0557600080fd5b613a0e85613353565b9350602085013567ffffffffffffffff80821115613a2b57600080fd5b613a37888389016136b1565b94506040870135915080821115613a4d57600080fd5b613a59888389016136b1565b93506060870135915080821115613a6f57600080fd5b5061393a87828801613586565b60008060408385031215613a8f57600080fd5b613a9883613353565b9150613aa660208401613353565b90509250929050565b600080600080600060a08688031215613ac757600080fd5b613ad086613353565b9450613ade60208701613353565b93506040860135925060608601359150608086013567ffffffffffffffff811115613b0857600080fd5b6137bf88828901613586565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761059357610593613b43565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613bba57613bba613b43565b5060010190565b600181811c90821680613bd557607f821691505b602082108103613c0e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8181038181111561059357610593613b43565b600081613c3657613c36613b43565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f82111561072a57600081815260208120601f850160051c81016020861015613c835750805b601f850160051c820191505b81811015611d0457828155600101613c8f565b815167ffffffffffffffff811115613cbc57613cbc613424565b613cd081613cca8454613bc1565b84613c5c565b602080601f831160018114613d235760008415613ced5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611d04565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613d7057888601518255948401946001909101908401613d51565b5085821015613dac57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561059357610593613b43565b604081526000613de26040830185613897565b8281036020840152613df48185613897565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a06040830152613e3660a0830186613897565b8281036060840152613e488186613897565b90508281036080840152613e5c8185613616565b98975050505050505050565b600060208284031215613e7a57600080fd5b8151610ae9816133a6565b600060033d1115613e9e5760046000803e5060005160e01c5b90565b600060443d1015613eaf5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715613efd57505050505090565b8285019150815181811115613f155750505050505090565b843d8701016020828501011115613f2f5750505050505090565b613f3e60208286010187613453565b509095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a06080830152613f8e60a0830184613616565b97965050505050505056fea2646970667358221220812bd2954dfeeae0d116de71179bc84f20928278138ce61872e78ade1bcd22ce64736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638b81c63911610104578063b5674c68116100a2578063f242432a11610071578063f242432a14610460578063f2fde38b14610473578063f5298aca14610486578063f8f88dc21461049957600080fd5b8063b5674c68146103e9578063e2ab691d146103fc578063e8a3d4851461040f578063e985e9c51461041757600080fd5b806399d50d5d116100de57806399d50d5d14610377578063a22cb4651461038d578063a89027f8146103a0578063b48ab8b6146103d657600080fd5b80638b81c639146103335780638da5cb5b14610346578063938e3d7b1461036457600080fd5b80632eb2c2d6116101715780635c87c8f91161014b5780635c87c8f9146102d0578063715018a61461030f578063731133e9146103175780638215eccd1461032a57600080fd5b80632eb2c2d61461028a578063468b3b331461029d5780634e1273f4146102b057600080fd5b806302fe5305116101ad57806302fe53051461023157806305917eee146102445780630dbaf77f146102575780630e89341c1461026a57600080fd5b8062fdd58e146101d357806301ffc9a7146101f9578063022b23d51461021c575b600080fd5b6101e66101e136600461337c565b6104b9565b6040519081526020015b60405180910390f35b61020c6102073660046133d4565b610599565b60405190151581526020016101f0565b61022f61022a3660046133f1565b6105ef565b005b61022f61023f36600461351a565b61072f565b61022f61025236600461356b565b610743565b61022f6102653660046135a6565b610837565b61027d6102783660046135fd565b610947565b6040516101f0919061367a565b61022f610298366004613722565b6109db565b6101e66102ab36600461337c565b610aa4565b6102c36102be3660046137cc565b610af0565b6040516101f091906138d2565b600a5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b61022f610c48565b61022f6103253660046138e5565b610c5c565b6101e660095481565b6101e661034136600461337c565b610d15565b60065473ffffffffffffffffffffffffffffffffffffffff166102ea565b61022f61037236600461351a565b610d58565b61037f610d70565b6040516101f0929190613946565b61022f61039b3660046139b3565b610e3a565b6101e66103ae36600461356b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526008602052604090205490565b61022f6103e43660046139ef565b610e45565b61022f6103f73660046133f1565b6110bd565b61022f61040a3660046133f1565b61116f565b61027d611221565b61020c610425366004613a7c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205460ff1690565b61022f61046e366004613aaf565b6112b3565b61022f61048136600461356b565b611375565b61022f6104943660046133f1565b611429565b6101e66104a736600461356b565b60086020526000908152604090205481565b600073ffffffffffffffffffffffffffffffffffffffff8316610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060008181526020818152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091529020545b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fb0262bf60000000000000000000000000000000000000000000000000000000014806105935750610593826114e9565b60005b60045481101561071e576004818154811061060f5761060f613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5674c6885856005858154811061066a5761066a613b14565b9060005260206000200154866106809190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b1580156106f357600080fd5b505af1158015610707573d6000803e3d6000fd5b50505050808061071690613b89565b9150506105f2565b5061072a8383836115cc565b505050565b610737611707565b61074081611788565b50565b61074b611707565b73ffffffffffffffffffffffffffffffffffffffff81166107c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d75737420737065636966792072616e6b696e6720696e7374616e6365000000604482015260640161055a565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f6a0707879bc3853a8fcf9dbebe74a41dd8ea34813c262a58f1f99038559d1e2190600090a250565b73ffffffffffffffffffffffffffffffffffffffff83163314806108725750600a5473ffffffffffffffffffffffffffffffffffffffff1633145b6108d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6c6576656c55703a204e6f74207065726d697474656400000000000000000000604482015260640161055a565b6108e58383600b546115cc565b6108f28360018484611794565b8273ffffffffffffffffffffffffffffffffffffffff167f91e51c29e7e87a74ad3b8ccba98538970f50a4309242735467f41e27c6b0fbac8360405161093a91815260200190565b60405180910390a2505050565b60606002805461095690613bc1565b80601f016020809104026020016040519081016040528092919081815260200182805461098290613bc1565b80156109cf5780601f106109a4576101008083540402835291602001916109cf565b820191906000526020600020905b8154815290600101906020018083116109b257829003601f168201915b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff8516331480610a045750610a048533610425565b610a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b610a9d85858585856119b6565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360209081526040808320848452909152812054610adf84846104b9565b610ae99190613c14565b9392505050565b60608151835114610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d617463680000000000000000000000000000000000000000000000606482015260840161055a565b6000835167ffffffffffffffff811115610b9f57610b9f613424565b604051908082528060200260200182016040528015610bc8578160200160208202803683370190505b50905060005b8451811015610c4057610c13858281518110610bec57610bec613b14565b6020026020010151858381518110610c0657610c06613b14565b60200260200101516104b9565b828281518110610c2557610c25613b14565b6020908102919091010152610c3981613b89565b9050610bce565b509392505050565b610c50611707565b610c5a6000611d0c565b565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610d03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b610d0f84848484611794565b50505050565b6000815b8015610d4e576000610d2b85836104b9565b90508015610d3b57509050610593565b5080610d4681613c27565b915050610d19565b5060009392505050565b610d60611707565b6007610d6c8282613ca2565b5050565b6060806004600581805480602002602001604051908101604052809291908181526020018280548015610dd957602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dae575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610e2b57602002820191906000526020600020905b815481526020019060010190808311610e17575b50505050509050915091509091565b610d6c338383611d83565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610eec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416610f8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b8151600003611020576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f6966696564000000000000000000000000000000000000000000000000000000606482015260840161055a565b82516000036110b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b610d0f84848484611ed7565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b61072a83838361216e565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6f6e6c792072616e6b696e6720636f6e74726163742063616e20646f2074686160448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b61072a838383612297565b60606007805461123090613bc1565b80601f016020809104026020016040519081016040528092919081815260200182805461125c90613bc1565b80156112a95780601f1061127e576101008083540402835291602001916112a9565b820191906000526020600020905b81548152906001019060200180831161128c57829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff85163314806112dc57506112dc8533610425565b611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b610a9d85858585856123d4565b61137d611707565b73ffffffffffffffffffffffffffffffffffffffff8116611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161055a565b61074081611d0c565b73ffffffffffffffffffffffffffffffffffffffff831633148061145257506114528333610425565b6114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f766564000000000000000000000000000000000000606482015260840161055a565b61072a8383836115cc565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000148061157c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061059357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610593565b60005b6004548110156116fb57600481815481106115ec576115ec613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f5298aca85856005858154811061164757611647613b14565b90600052602060002001548661165d9190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b1580156116d057600080fd5b505af11580156116e4573d6000803e3d6000fd5b5050505080806116f390613b89565b9150506115cf565b5061072a83838361262e565b60065473ffffffffffffffffffffffffffffffffffffffff163314610c5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161055a565b6002610d6c8282613ca2565b73ffffffffffffffffffffffffffffffffffffffff8416611837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a2041646472657373206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b826000036118c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52616e6b546f6b656e2d3e6d696e743a20616d6f756e74206e6f74207370656360448201527f6966696564000000000000000000000000000000000000000000000000000000606482015260840161055a565b81600003611957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52616e6b546f6b656e2d3e6d696e743a20706f6f6c206964206e6f742073706560448201527f6369666965640000000000000000000000000000000000000000000000000000606482015260840161055a565b6009548211156119aa576009829055604051829073ffffffffffffffffffffffffffffffffffffffff8616907f05c066fccc179a1b704e61617b73bc27a30a3162d36704cb8d4305064471a24090600090a35b610d0f8483858461285f565b8151835114611a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416611aea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161055a565b33611af981878787878761299b565b60005b8451811015611c69576000858281518110611b1957611b19613b14565b602002602001015190506000858381518110611b3757611b37613b14565b6020908102919091018101516000848152808352604080822073ffffffffffffffffffffffffffffffffffffffff8e168352909352919091205490915081811015611c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161055a565b60008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8e8116855292528083208585039055908b16825281208054849290611c4e908490613dbc565b9250508190555050505080611c6290613b89565b9050611afc565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611ce0929190613dcf565b60405180910390a4611cf6818787878787612ae7565b611d04818787878787612d4b565b505050505050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c660000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8416611f7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b815183511461200b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161055a565b3361201b8160008787878761299b565b60005b84518110156120d05783818151811061203957612039613b14565b602002602001015160008087848151811061205657612056613b14565b6020026020010151815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120b89190613dbc565b909155508190506120c881613b89565b91505061201e565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612148929190613dcf565b60405180910390a461215f81600087878787612ae7565b610a9d81600087878787612d4b565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360209081526040808320858452909152902054811115612208576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020908152604080832085845290915281208054839290612248908490613c14565b9091555050604051818152829073ffffffffffffffffffffffffffffffffffffffff8516907f89882ad382a3742d4db24e4dabc5000c5852aed762904db28442e4e1630a1d0790602001611eca565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602090815260408083208584529091529020546122d3908290613dbc565b6122dd84846104b9565b1015612345576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020908152604080832085845290915281208054839290612385908490613dbc565b9091555050604051818152829073ffffffffffffffffffffffffffffffffffffffff8516907fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d90602001611eca565b73ffffffffffffffffffffffffffffffffffffffff8416612477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161055a565b33600061248385612fd5565b9050600061249085612fd5565b90506124a083898985858961299b565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8c1684529091529020548581101561255e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161055a565b60008781526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8d8116855292528083208985039055908a168252812080548892906125a8908490613dbc565b9091555050604080518881526020810188905273ffffffffffffffffffffffffffffffffffffffff808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612615848a8a86868a612ae7565b612623848a8a8a8a8a613020565b505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166126d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161055a565b3360006126dd84612fd5565b905060006126ea84612fd5565b905061270a8387600085856040518060200160405280600081525061299b565b60008581526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8a168452909152902054848110156127c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e636500000000000000000000000000000000000000000000000000000000606482015260840161055a565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461285684886000868660405180602001604052806000815250612ae7565b50505050505050565b60005b60045481101561298e576004818154811061287f5761287f613b14565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2ab691d8686600585815481106128da576128da613b14565b9060005260206000200154876128f09190613b72565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152606401600060405180830381600087803b15801561296357600080fd5b505af1158015612977573d6000803e3d6000fd5b50505050808061298690613b89565b915050612862565b50610d0f848484846131cd565b60005b8351811015612ae15773ffffffffffffffffffffffffffffffffffffffff861615612acf576129d986858381518110610c0657610c06613b14565b8382815181106129eb576129eb613b14565b6020026020010151600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878581518110612a4657612a46613b14565b6020026020010151815260200190815260200160002054612a679190613dbc565b1115612acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e73756666696369656e740000000000000000000000000000000000000000604482015260640161055a565b80612ad981613b89565b91505061299e565b50611d04565b60005b835181101561285657838181518110612b0557612b05613b14565b6020026020010151600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054108015612b745750828181518110612b6757612b67613b14565b6020026020010151600014155b15612c3457838181518110612b8b57612b8b613b14565b6020026020010151600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550838181518110612be857612be8613b14565b60200260200101518573ffffffffffffffffffffffffffffffffffffffff167f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb760405160405180910390a35b73ffffffffffffffffffffffffffffffffffffffff861615801590612cae575073ffffffffffffffffffffffffffffffffffffffff8616600090815260086020526040902054612c85908790610d15565b73ffffffffffffffffffffffffffffffffffffffff871660009081526008602052604090205414155b15612d395773ffffffffffffffffffffffffffffffffffffffff8616600090815260086020526040812054612ce4908890610d15565b73ffffffffffffffffffffffffffffffffffffffff88166000818152600860205260408082208490555192935083927f83868f8c9b95fb4e3033e4bd8340c88ee6137771dbaf89333c960a3183258fb79190a3505b80612d4381613b89565b915050612aea565b73ffffffffffffffffffffffffffffffffffffffff84163b15611d04576040517fbc197c8100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063bc197c8190612dc29089908990889088908890600401613dfd565b6020604051808303816000875af1925050508015612e1b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612e1891810190613e68565b60015b612f0457612e27613e85565b806308c379a003612e7a5750612e3b613ea1565b80612e465750612e7c565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a919061367a565b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e746572000000000000000000000000606482015260840161055a565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014612856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161055a565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061300f5761300f613b14565b602090810291909101015292915050565b73ffffffffffffffffffffffffffffffffffffffff84163b15611d04576040517ff23a6e6100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f23a6e61906130979089908990889088908890600401613f49565b6020604051808303816000875af19250505080156130f0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526130ed91810190613e68565b60015b6130fc57612e27613e85565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014612856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161055a565b73ffffffffffffffffffffffffffffffffffffffff8416613270576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161055a565b33600061327c85612fd5565b9050600061328985612fd5565b905061329a8360008985858961299b565b60008681526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8b168452909152812080548792906132d7908490613dbc565b9091555050604080518781526020810187905273ffffffffffffffffffffffffffffffffffffffff808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461334483600089858589612ae7565b61285683600089898989613020565b803573ffffffffffffffffffffffffffffffffffffffff8116811461337757600080fd5b919050565b6000806040838503121561338f57600080fd5b61339883613353565b946020939093013593505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461074057600080fd5b6000602082840312156133e657600080fd5b8135610ae9816133a6565b60008060006060848603121561340657600080fd5b61340f84613353565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561349757613497613424565b6040525050565b600067ffffffffffffffff8311156134b8576134b8613424565b6040516134ed60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8701160182613453565b80915083815284848401111561350257600080fd5b83836020830137600060208583010152509392505050565b60006020828403121561352c57600080fd5b813567ffffffffffffffff81111561354357600080fd5b8201601f8101841361355457600080fd5b6135638482356020840161349e565b949350505050565b60006020828403121561357d57600080fd5b610ae982613353565b600082601f83011261359757600080fd5b610ae98383356020850161349e565b6000806000606084860312156135bb57600080fd5b6135c484613353565b925060208401359150604084013567ffffffffffffffff8111156135e757600080fd5b6135f386828701613586565b9150509250925092565b60006020828403121561360f57600080fd5b5035919050565b6000815180845260005b8181101561363c57602081850181015186830182015201613620565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ae96020830184613616565b600067ffffffffffffffff8211156136a7576136a7613424565b5060051b60200190565b600082601f8301126136c257600080fd5b813560206136cf8261368d565b6040516136dc8282613453565b83815260059390931b85018201928281019150868411156136fc57600080fd5b8286015b848110156137175780358352918301918301613700565b509695505050505050565b600080600080600060a0868803121561373a57600080fd5b61374386613353565b945061375160208701613353565b9350604086013567ffffffffffffffff8082111561376e57600080fd5b61377a89838a016136b1565b9450606088013591508082111561379057600080fd5b61379c89838a016136b1565b935060808801359150808211156137b257600080fd5b506137bf88828901613586565b9150509295509295909350565b600080604083850312156137df57600080fd5b823567ffffffffffffffff808211156137f757600080fd5b818501915085601f83011261380b57600080fd5b813560206138188261368d565b6040516138258282613453565b83815260059390931b850182019282810191508984111561384557600080fd5b948201945b8386101561386a5761385b86613353565b8252948201949082019061384a565b9650508601359250508082111561388057600080fd5b5061388d858286016136b1565b9150509250929050565b600081518084526020808501945080840160005b838110156138c7578151875295820195908201906001016138ab565b509495945050505050565b602081526000610ae96020830184613897565b600080600080608085870312156138fb57600080fd5b61390485613353565b93506020850135925060408501359150606085013567ffffffffffffffff81111561392e57600080fd5b61393a87828801613586565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b8281101561399557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101613963565b505050838103828501526139a98186613897565b9695505050505050565b600080604083850312156139c657600080fd5b6139cf83613353565b9150602083013580151581146139e457600080fd5b809150509250929050565b60008060008060808587031215613a0557600080fd5b613a0e85613353565b9350602085013567ffffffffffffffff80821115613a2b57600080fd5b613a37888389016136b1565b94506040870135915080821115613a4d57600080fd5b613a59888389016136b1565b93506060870135915080821115613a6f57600080fd5b5061393a87828801613586565b60008060408385031215613a8f57600080fd5b613a9883613353565b9150613aa660208401613353565b90509250929050565b600080600080600060a08688031215613ac757600080fd5b613ad086613353565b9450613ade60208701613353565b93506040860135925060608601359150608086013567ffffffffffffffff811115613b0857600080fd5b6137bf88828901613586565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761059357610593613b43565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613bba57613bba613b43565b5060010190565b600181811c90821680613bd557607f821691505b602082108103613c0e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8181038181111561059357610593613b43565b600081613c3657613c36613b43565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f82111561072a57600081815260208120601f850160051c81016020861015613c835750805b601f850160051c820191505b81811015611d0457828155600101613c8f565b815167ffffffffffffffff811115613cbc57613cbc613424565b613cd081613cca8454613bc1565b84613c5c565b602080601f831160018114613d235760008415613ced5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611d04565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613d7057888601518255948401946001909101908401613d51565b5085821015613dac57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561059357610593613b43565b604081526000613de26040830185613897565b8281036020840152613df48185613897565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a06040830152613e3660a0830186613897565b8281036060840152613e488186613897565b90508281036080840152613e5c8185613616565b98975050505050505050565b600060208284031215613e7a57600080fd5b8151610ae9816133a6565b600060033d1115613e9e5760046000803e5060005160e01c5b90565b600060443d1015613eaf5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715613efd57505050505090565b8285019150815181811115613f155750505050505090565b843d8701016020828501011115613f2f5750505050505090565b613f3e60208286010187613453565b509095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a06080830152613f8e60a0830184613616565b97965050505050505056fea2646970667358221220812bd2954dfeeae0d116de71179bc84f20928278138ce61872e78ade1bcd22ce64736f6c63430008140033", "devdoc": { "events": { "ApprovalForAll(address,address,bool)": { @@ -977,6 +956,40 @@ "balanceOfBatch(address[],uint256[])": { "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." }, + "batchMint(address,uint256[],uint256[],bytes)": { + "details": "Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data." + }, + "burn(address,uint256,uint256)": { + "details": "Burns a specified amount of tokens from the given account. This will burn all underlying (composite) assets Requirements: - `account` must be the token owner or an approved operator. - `id` and `value` must be valid token ID and amount to burn. - All underlying \"composite\" assets implement burn as well", + "params": { + "account": "The address of the token owner.", + "id": "The ID of the token to burn.", + "value": "The amount of tokens to burn." + } + }, + "decompose(address,uint256,uint256)": { + "details": "Decomposes a composite ERC1155 token into its individual components. This function unlocks the specified amount of the composite token from each dimension, and then burns the specified amount of the composite token from the caller's balance.", + "params": { + "amount": "The amount of the composite token to decompose.", + "from": "The address from which the composite token is being decomposed.", + "id": "The ID of the composite token being decomposed." + } + }, + "findNewRank(address,uint256)": { + "details": "Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account. It checks the balance of the account and returns the new rank that can be upgraded to. Returns: - The new rank of the account." + }, + "getAccountRank(address)": { + "details": "Gets the rank of an account. `account` is the address of the account. Returns: - The rank of the account." + }, + "getComponents()": { + "details": "Retrieves the components of the CompositeERC1155 contract.", + "returns": { + "_0": "An array of component addresses and an array of component weights." + } + }, + "getRankingInstance()": { + "details": "Gets the ranking instance which can emit new rank updates and mint rank tokens. Returns: - The address of the ranking instance." + }, "isApprovedForAll(address,address)": { "details": "See {IERC1155-isApprovedForAll}." }, @@ -998,12 +1011,19 @@ "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, - "updateRankingInstance(address)": { - "details": "Updates the address of the ranking instance contract.", + "unlockedBalanceOf(address,uint256)": { + "details": "Returns the unlocked balance of a specific ERC1155 token for an account. The unlocked balance is calculated by subtracting the locked amount from the total balance.", "params": { - "newRankingInstance": "The new address of the ranking instance contract." + "account": "The address of the account.", + "id": "The ID of the ERC1155 token." + }, + "returns": { + "_0": "The unlocked balance of the ERC1155 token for the account." } }, + "updateRankingInstance(address)": { + "details": "Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance. emits a _RankingInstanceUpdated_ event." + }, "uri(uint256)": { "details": "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." } @@ -1042,7 +1062,7 @@ "type": "t_string_storage" }, { - "astId": 14807, + "astId": 14812, "contract": "src/tokens/RankToken.sol:RankToken", "label": "lockedAmounts", "offset": 0, @@ -1050,7 +1070,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 14526, + "astId": 14527, "contract": "src/tokens/RankToken.sol:RankToken", "label": "dimensions", "offset": 0, @@ -1058,7 +1078,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 14529, + "astId": 14530, "contract": "src/tokens/RankToken.sol:RankToken", "label": "weights", "offset": 0, @@ -1074,7 +1094,7 @@ "type": "t_address" }, { - "astId": 20789, + "astId": 22777, "contract": "src/tokens/RankToken.sol:RankToken", "label": "_contractURI", "offset": 0, @@ -1082,7 +1102,7 @@ "type": "t_string_storage" }, { - "astId": 20793, + "astId": 22781, "contract": "src/tokens/RankToken.sol:RankToken", "label": "rank", "offset": 0, @@ -1090,7 +1110,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 20795, + "astId": 22783, "contract": "src/tokens/RankToken.sol:RankToken", "label": "topRank", "offset": 0, @@ -1098,7 +1118,7 @@ "type": "t_uint256" }, { - "astId": 20797, + "astId": 22785, "contract": "src/tokens/RankToken.sol:RankToken", "label": "_rankingInstance", "offset": 0, @@ -1106,7 +1126,7 @@ "type": "t_address" }, { - "astId": 20799, + "astId": 22787, "contract": "src/tokens/RankToken.sol:RankToken", "label": "_levelUpThreshold", "offset": 0, diff --git a/deployments/anvil/RankifyInstance.json b/deployments/anvil/RankifyInstance.json index eea8fb6..bdcb0e2 100644 --- a/deployments/anvil/RankifyInstance.json +++ b/deployments/anvil/RankifyInstance.json @@ -1,5 +1,5 @@ { - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "abi": [ { "inputs": [ @@ -2082,22 +2082,22 @@ "type": "function" } ], - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", "receipt": { "to": null, "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", - "contractAddress": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "contractAddress": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "transactionIndex": 0, - "gasUsed": "4314562", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000000000020000000000000000000000000020000000000000000000000000000000000001000", - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331", - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", + "gasUsed": "4314556", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000100000010000000000000000000001000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000", + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c", + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", "logs": [ { "transactionIndex": 0, - "blockNumber": 350, - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "blockNumber": 494, + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -2105,23 +2105,23 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331" + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c" }, { "transactionIndex": 0, - "blockNumber": 350, - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "blockNumber": 494, + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "topics": [ "0x8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673" ], - "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ac0000000000000000000000000cb5c55b0dee9e0d6198199f12a7998878428af3900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001958759df700000000000000000000000000000000000000000000000000000000392b749c0000000000000000000000000000000000000000000000000000000069958ab90000000000000000000000000000000000000000000000000000000007ead930000000000000000000000000000000000000000000000000000000003b17469e00000000000000000000000000000000000000000000000000000000e240ae5f00000000000000000000000000000000000000000000000000000000aee5f34a000000000000000000000000000000000000000000000000000000007f4e484900000000000000000000000000000000000000000000000000000000f72ea467000000000000000000000000000000000000000000000000000000009a214b1e00000000000000000000000000000000000000000000000000000000460e204900000000000000000000000000000000000000000000000000000000bfa640360000000000000000000000000000000000000000000000000000000004527d9000000000000000000000000000000000000000000000000000000000b55991c0000000000000000000000000000000000000000000000000000000008eed01f800000000000000000000000000000000000000000000000000000000b881cffe000000000000000000000000000000000000000000000000000000009637460e000000000000000000000000000000000000000000000000000000004024ba7500000000000000000000000000000000000000000000000000000000efaa55a0000000000000000000000000000000000000000000000000000000003feef58a00000000000000000000000000000000000000000000000000000000bc197c8100000000000000000000000000000000000000000000000000000000f23a6e6100000000000000000000000000000000000000000000000000000000150b7a0200000000000000000000000000000000000000000000000000000000cca84a0c00000000000000000000000000000000000000000000000000000000e5ed1d5900000000000000000000000000000000000000000000000000000000000000000000000000000000173d20bee670466887b24aa7922b390850ff7abb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030c6446d500000000000000000000000000000000000000000000000000000000463bc355000000000000000000000000000000000000000000000000000000006a9947350000000000000000000000000000000000000000000000000000000000000000000000000000000038099cf572177fa663fa965ecef555337186fedc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003bf0f2d7e000000000000000000000000000000000000000000000000000000008f298b2a00000000000000000000000000000000000000000000000000000000bbb294f800000000000000000000000000000000000000000000000000000000000000000000000000000000941d54f8dbfe25d1caeb440b72c489aac4bb04500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000026cbadbfa00000000000000000000000000000000000000000000000000000000d3a8018d00000000000000000000000000000000000000000000000000000000000000000000000000000000e7edc83fefaca5f057dd1e7477bf07496d1a86eb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011e77abbc00000000000000000000000000000000000000000000000000000000000000000000000000000000a8ce553e9dc807db4cac12f43d50d19200d9ec8400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000826126d460000000000000000000000000000000000000000000000000000000059db5bf7000000000000000000000000000000000000000000000000000000008651734100000000000000000000000000000000000000000000000000000000966fb1ea00000000000000000000000000000000000000000000000000000000924b5bb100000000000000000000000000000000000000000000000000000000869dc02100000000000000000000000000000000000000000000000000000000c94b01da00000000000000000000000000000000000000000000000000000000911f8e1b00000000000000000000000000000000000000000000000000000000000000000000000000000000429dbde7913c0ed51e4b21163760b92ee66ff5f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad6e96ff641af53cce4205dafecb8e3acd0490e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000003bcf4185443a339517ad4e580067f178d1b68e1d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ac0000000000000000000000000e0744e372a685ae1c1a4ec3c5e56524b03582c9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001958759df700000000000000000000000000000000000000000000000000000000392b749c0000000000000000000000000000000000000000000000000000000069958ab90000000000000000000000000000000000000000000000000000000007ead930000000000000000000000000000000000000000000000000000000003b17469e00000000000000000000000000000000000000000000000000000000e240ae5f00000000000000000000000000000000000000000000000000000000aee5f34a000000000000000000000000000000000000000000000000000000007f4e484900000000000000000000000000000000000000000000000000000000f72ea467000000000000000000000000000000000000000000000000000000009a214b1e00000000000000000000000000000000000000000000000000000000460e204900000000000000000000000000000000000000000000000000000000bfa640360000000000000000000000000000000000000000000000000000000004527d9000000000000000000000000000000000000000000000000000000000b55991c0000000000000000000000000000000000000000000000000000000008eed01f800000000000000000000000000000000000000000000000000000000b881cffe000000000000000000000000000000000000000000000000000000009637460e000000000000000000000000000000000000000000000000000000004024ba7500000000000000000000000000000000000000000000000000000000efaa55a0000000000000000000000000000000000000000000000000000000003feef58a00000000000000000000000000000000000000000000000000000000bc197c8100000000000000000000000000000000000000000000000000000000f23a6e6100000000000000000000000000000000000000000000000000000000150b7a0200000000000000000000000000000000000000000000000000000000cca84a0c00000000000000000000000000000000000000000000000000000000e5ed1d59000000000000000000000000000000000000000000000000000000000000000000000000000000002e24f0528ffdb09adcbd6ac8b3321fcc8198c1820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030c6446d500000000000000000000000000000000000000000000000000000000463bc355000000000000000000000000000000000000000000000000000000006a99473500000000000000000000000000000000000000000000000000000000000000000000000000000000837e298d2472337ad89d666eafb6c272728fd43b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003bf0f2d7e000000000000000000000000000000000000000000000000000000008f298b2a00000000000000000000000000000000000000000000000000000000bbb294f800000000000000000000000000000000000000000000000000000000000000000000000000000000941d54f8dbfe25d1caeb440b72c489aac4bb04500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000026cbadbfa00000000000000000000000000000000000000000000000000000000d3a8018d0000000000000000000000000000000000000000000000000000000000000000000000000000000037c1d4d9762ddc02ae1df9cb1401ae40a19b532c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011e77abbc00000000000000000000000000000000000000000000000000000000000000000000000000000000d10b43a07ad4eecfdd0018ea6cabeb69f8d0ef4c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000826126d460000000000000000000000000000000000000000000000000000000059db5bf7000000000000000000000000000000000000000000000000000000008651734100000000000000000000000000000000000000000000000000000000966fb1ea00000000000000000000000000000000000000000000000000000000924b5bb100000000000000000000000000000000000000000000000000000000869dc02100000000000000000000000000000000000000000000000000000000c94b01da00000000000000000000000000000000000000000000000000000000911f8e1b00000000000000000000000000000000000000000000000000000000000000000000000000000000429dbde7913c0ed51e4b21163760b92ee66ff5f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad6e96ff641af53cce4205dafecb8e3acd0490e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000003bcf4185443a339517ad4e580067f178d1b68e1d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logIndex": 1, - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331" + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c" } ], - "blockNumber": 350, - "cumulativeGasUsed": "4314562", + "blockNumber": 494, + "cumulativeGasUsed": "4314556", "status": 1, "byzantium": true }, @@ -2129,7 +2129,7 @@ "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", [ { - "facetAddress": "0xCB5c55B0DeE9e0d6198199F12A7998878428AF39", + "facetAddress": "0xE0744E372a685aE1c1a4ec3C5E56524b03582c9B", "functionSelectors": [ "0x58759df7", "0x392b749c", @@ -2160,7 +2160,7 @@ "action": 0 }, { - "facetAddress": "0x173D20Bee670466887B24AA7922b390850FF7abB", + "facetAddress": "0x2E24f0528Ffdb09ADCbd6AC8b3321fCC8198C182", "functionSelectors": [ "0x0c6446d5", "0x463bc355", @@ -2169,7 +2169,7 @@ "action": 0 }, { - "facetAddress": "0x38099cf572177fa663fa965eCef555337186fEdc", + "facetAddress": "0x837e298D2472337ad89d666eAFb6c272728fd43b", "functionSelectors": [ "0xbf0f2d7e", "0x8f298b2a", @@ -2186,14 +2186,14 @@ "action": 0 }, { - "facetAddress": "0xE7edC83fefacA5F057DD1E7477Bf07496d1A86eB", + "facetAddress": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", "functionSelectors": [ "0x1e77abbc" ], "action": 0 }, { - "facetAddress": "0xa8CE553e9dc807dB4caC12F43D50D19200d9ec84", + "facetAddress": "0xD10B43A07ad4EEcfDd0018eA6CaBeB69F8d0eF4C", "functionSelectors": [ "0x26126d46", "0x59db5bf7", @@ -2239,19 +2239,19 @@ "initData": "0x2a84809100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000148e2b093000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, { - "initContract": "0xE7edC83fefacA5F057DD1E7477Bf07496d1A86eB", - "initData": "0x1e77abbc000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000e52616e6b6679496e7374616e63650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005302e302e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000231e0b68978ca2015a8c3cae7aa3ca34dc1700bc0000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000018000000000000000000000000021c68aa0be617ebe09138d185bf2ff804131a8da000000000000000000000000000000000000000000000000000000000000000d4265737420506c61796c69737400000000000000000000000000000000000000" + "initContract": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", + "initData": "0x1e77abbc000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000e52616e6b6679496e7374616e63650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005302e302e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093a8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000005000000000000000000000000bbda1841822cc43954fa455ab1cb9de5f927089400000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000018000000000000000000000000021c68aa0be617ebe09138d185bf2ff804131a8da000000000000000000000000000000000000000000000000000000000000000f4d75736963204368616c6c656e67650000000000000000000000000000000000" } ] ], - "numDeployments": 2, + "numDeployments": 1, "solcInputHash": "3fe12e823553336a8d0f950a5a792ac9", "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contractOwner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"enum IDiamondCut.FacetCutAction\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"internalType\":\"struct IDiamondCut.FacetCut[]\",\"name\":\"_diamondCut\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"initContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"initData\",\"type\":\"bytes\"}],\"internalType\":\"struct Diamond.Initialization[]\",\"name\":\"_initializations\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_contractOwner\":\"the owner of the contract. With default DiamondCutFacet, this is the sole address allowed to make further cuts.\",\"_diamondCut\":\"the list of facet to add\",\"_initializations\":\"the list of initialization pair to execute. This allow to setup a contract with multiple level of independent initialization.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"This construct a diamond contract\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/diamond/Diamond.sol\":\"Diamond\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/diamond/Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n*\\n* Implementation of a diamond.\\n/******************************************************************************/\\n\\nimport {LibDiamond} from \\\"./libraries/LibDiamond.sol\\\";\\nimport {IDiamondCut} from \\\"./interfaces/IDiamondCut.sol\\\";\\n\\ncontract Diamond {\\n struct Initialization {\\n address initContract;\\n bytes initData;\\n }\\n\\n /// @notice This construct a diamond contract\\n /// @param _contractOwner the owner of the contract. With default DiamondCutFacet, this is the sole address allowed to make further cuts.\\n /// @param _diamondCut the list of facet to add\\n /// @param _initializations the list of initialization pair to execute. This allow to setup a contract with multiple level of independent initialization.\\n constructor(\\n address _contractOwner,\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n Initialization[] memory _initializations\\n ) payable {\\n if (_contractOwner != address(0)) {\\n LibDiamond.setContractOwner(_contractOwner);\\n }\\n\\n LibDiamond.diamondCut(_diamondCut, address(0), \\\"\\\");\\n\\n for (uint256 i = 0; i < _initializations.length; i++) {\\n LibDiamond.initializeDiamondCut(_initializations[i].initContract, _initializations[i].initData);\\n }\\n }\\n\\n // Find facet for function that is called and execute the\\n // function if a facet is found and return any value.\\n fallback() external payable {\\n LibDiamond.DiamondStorage storage ds;\\n bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;\\n // get diamond storage\\n assembly {\\n ds.slot := position\\n }\\n // get facet from function selector\\n address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;\\n require(facet != address(0), \\\"Diamond: Function does not exist\\\");\\n // Execute external function from facet using delegatecall and return any value.\\n assembly {\\n // copy function selector and any arguments\\n calldatacopy(0, 0, calldatasize())\\n // execute function call using the facet\\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\\n // get any return value\\n returndatacopy(0, 0, returndatasize())\\n // return any return value or error back to the caller\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x9f459a9f18d5429b0dd40e60b4a67a27d2b94693c4d190ed9dd7034a894c1eb6\",\"license\":\"MIT\"},\"solc_0.8/diamond/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {Add, Replace, Remove}\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0xc00c16bfa30a3fa5f3dc684f7f8ba62c259962b25f647d9588739458989717fc\",\"license\":\"MIT\"},\"solc_0.8/diamond/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage(); \\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress); \\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n } \\n\\n\\n function addFunction(DiamondStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _facetAddress) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal { \\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x2205345e83eb86f5281f159a9215a096cb6d404782619f9b8e9d7a4a46c32a37\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60806040526040516200321e3803806200321e833981016040819052620000269162001340565b6001600160a01b038316156200004c576200004c83620000f760201b620001071760201c565b62000074826000604051806020016040528060008152506200017b60201b620001c11760201c565b60005b8151811015620000ed57620000d88282815181106200009a576200009a62001514565b602002602001015160000151838381518110620000bb57620000bb62001514565b602002602001015160200151620003d960201b620004051760201c565b80620000e48162001540565b91505062000077565b505050506200173d565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132080546001600160a01b031981166001600160a01b0384811691821790935560405160008051602062003172833981519152939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60005b83518110156200038a5760008482815181106200019f576200019f62001514565b602002602001015160200151905060006002811115620001c357620001c36200155e565b816002811115620001d857620001d86200155e565b1415620002375762000231858381518110620001f857620001f862001514565b60200260200101516000015186848151811062000219576200021962001514565b602002602001015160400151620005fe60201b60201c565b62000374565b60018160028111156200024e576200024e6200155e565b1415620002a757620002318583815181106200026e576200026e62001514565b6020026020010151600001518684815181106200028f576200028f62001514565b6020026020010151604001516200088860201b60201c565b6002816002811115620002be57620002be6200155e565b1415620003175762000231858381518110620002de57620002de62001514565b602002602001015160000151868481518110620002ff57620002ff62001514565b60200260200101516040015162000b1e60201b60201c565b60405162461bcd60e51b815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f727265637420466163657443756044820152663a20b1ba34b7b760c91b60648201526084015b60405180910390fd5b5080620003818162001540565b9150506200017e565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620003c093929190620015a2565b60405180910390a1620003d48282620003d9565b505050565b6001600160a01b03821662000463578051156200045f5760405162461bcd60e51b815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d7074790000000060648201526084016200036b565b5050565b6000815111620004dc5760405162461bcd60e51b815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f74206164647265737328302900000060648201526084016200036b565b6001600160a01b038216301462000512576200051282604051806060016040528060288152602001620031926028913962000c7e565b600080836001600160a01b0316836040516200052f9190620016a9565b600060405180830381855af49150503d80600081146200056c576040519150601f19603f3d011682016040523d82523d6000602084013e62000571565b606091505b509150915081620005f857805115620005a0578060405162461bcd60e51b81526004016200036b9190620016c7565b60405162461bcd60e51b815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e2072656044820152651d995c9d195960d21b60648201526084016200036b565b50505050565b6000815111620006545760405162461bcd60e51b815260206004820152602b6024820152600080516020620031fe83398151915260448201526a1858d95d081d1bc818dd5d60aa1b60648201526084016200036b565b600080516020620031728339815191526001600160a01b038316620006c05760405162461bcd60e51b815260206004820152602c6024820152600080516020620031ba83398151915260448201526b65206164647265737328302960a01b60648201526084016200036b565b6001600160a01b03831660009081526001820160205260409020546001600160601b038116620006f657620006f6828562000ca2565b60005b8351811015620008815760008482815181106200071a576200071a62001514565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b03168015620007c25760405162461bcd60e51b815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c726561647920657869737473000000000000000000000060648201526084016200036b565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b031916179055836200086681620016e3565b94505050508080620008789062001540565b915050620006f9565b5050505050565b6000815111620008de5760405162461bcd60e51b815260206004820152602b6024820152600080516020620031fe83398151915260448201526a1858d95d081d1bc818dd5d60aa1b60648201526084016200036b565b600080516020620031728339815191526001600160a01b0383166200094a5760405162461bcd60e51b815260206004820152602c6024820152600080516020620031ba83398151915260448201526b65206164647265737328302960a01b60648201526084016200036b565b6001600160a01b03831660009081526001820160205260409020546001600160601b038116620009805762000980828562000ca2565b60005b835181101562000881576000848281518110620009a457620009a462001514565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b0390811690871681141562000a525760405162461bcd60e51b815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e000000000000000060648201526084016200036b565b62000a5f85828462000d0f565b6001600160e01b0319821660008181526020878152604080832080546001600160a01b03908116600160a01b6001600160601b038c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281546001600160a01b0319161790558362000b0381620016e3565b9450505050808062000b159062001540565b91505062000983565b600081511162000b745760405162461bcd60e51b815260206004820152602b6024820152600080516020620031fe83398151915260448201526a1858d95d081d1bc818dd5d60aa1b60648201526084016200036b565b600080516020620031728339815191526001600160a01b0383161562000c035760405162461bcd60e51b815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d75737420626520616464726573732830290000000000000000000060648201526084016200036b565b60005b8251811015620005f857600083828151811062000c275762000c2762001514565b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b031662000c6684828462000d0f565b5050808062000c759062001540565b91505062000c06565b813b8181620005f85760405162461bcd60e51b81526004016200036b9190620016c7565b62000cc781604051806060016040528060248152602001620031da6024913962000c7e565b6002820180546001600160a01b0390921660008181526001948501602090815260408220860185905594840183559182529290200180546001600160a01b0319169091179055565b6001600160a01b03821662000d8d5760405162461bcd60e51b815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e277420657869737400000000000000000060648201526084016200036b565b6001600160a01b03821630141562000dff5760405162461bcd60e51b815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201526d3a30b1363290333ab731ba34b7b760911b60648201526084016200036b565b6001600160e01b03198116600090815260208481526040808320546001600160a01b0386168452600180880190935290832054600160a01b9091046001600160601b0316929162000e50916200170d565b905080821462000f49576001600160a01b0384166000908152600186016020526040812080548390811062000e895762000e8962001514565b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811062000edd5762000edd62001514565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b03199290921682528690526040902080546001600160a01b0316600160a01b6001600160601b038516021790555b6001600160a01b0384166000908152600186016020526040902080548062000f755762000f7562001727565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b0319851682528690526040812055806200088157600285015460009062000fd7906001906200170d565b6001600160a01b03861660009081526001808901602052604090912001549091508082146200108d5760008760020183815481106200101a576200101a62001514565b6000918252602090912001546002890180546001600160a01b0390921692508291849081106200104e576200104e62001514565b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055929091168152600189810190925260409020018190555b86600201805480620010a357620010a362001727565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b80516001600160a01b03811681146200110457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b038111828210171562001144576200114462001109565b60405290565b604051606081016001600160401b038111828210171562001144576200114462001109565b604051601f8201601f191681016001600160401b03811182821017156200119a576200119a62001109565b604052919050565b60006001600160401b03821115620011be57620011be62001109565b5060051b60200190565b60005b83811015620011e5578181015183820152602001620011cb565b83811115620005f85750506000910152565b6000601f83818401126200120a57600080fd5b82516020620012236200121d83620011a2565b6200116f565b82815260059290921b850181019181810190878411156200124357600080fd5b8287015b84811015620013345780516001600160401b0380821115620012695760008081fd5b908901906040601f19838d038101821315620012855760008081fd5b6200128f6200111f565b6200129c898601620010ec565b81528285015184811115620012b15760008081fd5b8086019550508d603f860112620012c85760008081fd5b8885015184811115620012df57620012df62001109565b620012f08a848e840116016200116f565b94508085528e848288010111156200130a57600092508283fd5b6200131b818b8701868901620011c8565b5080890193909352505084525091830191830162001247565b50979650505050505050565b6000806000606084860312156200135657600080fd5b6200136184620010ec565b60208501519093506001600160401b03808211156200137f57600080fd5b818601915086601f8301126200139457600080fd5b8151620013a56200121d82620011a2565b8082825260208201915060208360051b860101925089831115620013c857600080fd5b602085015b83811015620014e057805185811115620013e657600080fd5b86016060818d03601f19011215620013fd57600080fd5b620014076200114a565b6200141560208301620010ec565b81526040820151600381106200142a57600080fd5b60208201526060820151878111156200144257600080fd5b8083019250508c603f8301126200145857600080fd5b60208201516200146c6200121d82620011a2565b81815260059190911b83016040019060208101908f8311156200148e57600080fd5b6040850194505b82851015620014c95784516001600160e01b031981168114620014b757600080fd5b82526020948501949091019062001495565b6040840152505084525060209283019201620013cd565b5060408901519096509350505080821115620014fb57600080fd5b506200150a86828701620011f7565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200155757620015576200152a565b5060010190565b634e487b7160e01b600052602160045260246000fd5b600081518084526200158e816020860160208601620011c8565b601f01601f19169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156200167757898403607f19018652815180516001600160a01b031685528381015189860190600381106200161357634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b80831015620016615783516001600160e01b031916825292860192600192909201919086019062001635565b50978501979550505090820190600101620015cb565b50506001600160a01b038a169088015286810360408801526200169b818962001574565b9a9950505050505050505050565b60008251620016bd818460208701620011c8565b9190910192915050565b602081526000620016dc602083018462001574565b9392505050565b60006001600160601b03828116808214156200170357620017036200152a565b6001019392505050565b6000828210156200172257620017226200152a565b500390565b634e487b7160e01b600052603160045260246000fd5b611a25806200174d6000396000f3fe60806040523661000b57005b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6020819052604090912054819073ffffffffffffffffffffffffffffffffffffffff16806100e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f7420657869737460448201526064015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610102573d6000f35b3d6000fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff8481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60005b83518110156103ba5760008482815181106101e1576101e1611657565b60200260200101516020015190506000600281111561020257610202611686565b81600281111561021457610214611686565b14156102635761025e85838151811061022f5761022f611657565b60200260200101516000015186848151811061024d5761024d611657565b6020026020010151604001516106be565b6103a7565b600181600281111561027757610277611686565b14156102c15761025e85838151811061029257610292611657565b6020026020010151600001518684815181106102b0576102b0611657565b602002602001015160400151610a71565b60028160028111156102d5576102d5611686565b141561031f5761025e8583815181106102f0576102f0611657565b60200260200101516000015186848151811061030e5761030e611657565b602002602001015160400151610e2e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e0000000000000000000000000000000000000000000000000060648201526084016100da565b50806103b2816116e4565b9150506101c4565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738383836040516103ee93929190611793565b60405180910390a16104008282610405565b505050565b73ffffffffffffffffffffffffffffffffffffffff82166104b3578051156104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d7074790000000060648201526084016100da565b5050565b6000815111610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f74206164647265737328302900000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff8216301461058357610583826040518060600160405280602881526020016119a46028913961101b565b6000808373ffffffffffffffffffffffffffffffffffffffff16836040516105ab91906118fb565b600060405180830381855af49150503d80600081146105e6576040519150601f19603f3d011682016040523d82523d6000602084013e6105eb565b606091505b5091509150816106b85780511561063057806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100da9190611917565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560448201527f766572746564000000000000000000000000000000000000000000000000000060648201526084016100da565b50505050565b600081511161074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff8316610813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f652061646472657373283029000000000000000000000000000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001820160205260409020546bffffffffffffffffffffffff8116610858576108588285611056565b60005b8351811015610a6a57600084828151811061087857610878611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529186905260409091205490915073ffffffffffffffffffffffffffffffffffffffff16801561095d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c726561647920657869737473000000000000000000000060648201526084016100da565b7fffffffff000000000000000000000000000000000000000000000000000000008216600081815260208781526040808320805473ffffffffffffffffffffffffffffffffffffffff908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281547fffffffffffffffffffffffff00000000000000000000000000000000000000001617905583610a5281611931565b94505050508080610a62906116e4565b91505061085b565b5050505050565b6000815111610b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff8316610bc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f652061646472657373283029000000000000000000000000000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001820160205260409020546bffffffffffffffffffffffff8116610c0b57610c0b8285611056565b60005b8351811015610a6a576000848281518110610c2b57610c2b611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529186905260409091205490915073ffffffffffffffffffffffffffffffffffffffff908116908716811415610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e000000000000000060648201526084016100da565b610d218582846110e5565b7fffffffff000000000000000000000000000000000000000000000000000000008216600081815260208781526040808320805473ffffffffffffffffffffffffffffffffffffffff908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281547fffffffffffffffffffffffff00000000000000000000000000000000000000001617905583610e1681611931565b94505050508080610e26906116e4565b915050610c0e565b6000815111610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff831615610f84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d75737420626520616464726573732830290000000000000000000060648201526084016100da565b60005b82518110156106b8576000838281518110610fa457610fa4611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529185905260409091205490915073ffffffffffffffffffffffffffffffffffffffff166110068482846110e5565b50508080611013906116e4565b915050610f87565b813b81816106b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100da9190611917565b611078816040518060600160405280602481526020016119cc6024913961101b565b60028201805473ffffffffffffffffffffffffffffffffffffffff90921660008181526001948501602090815260408220860185905594840183559182529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b73ffffffffffffffffffffffffffffffffffffffff8216611188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e277420657869737400000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff821630141561122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e00000000000000000000000000000000000060648201526084016100da565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152602084815260408083205473ffffffffffffffffffffffffffffffffffffffff86168452600180880190935290832054740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692916112b89161195d565b90508082146113ff5773ffffffffffffffffffffffffffffffffffffffff8416600090815260018601602052604081208054839081106112fa576112fa611657565b6000918252602080832060088304015473ffffffffffffffffffffffffffffffffffffffff8916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811061135857611358611657565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790557fffffffff0000000000000000000000000000000000000000000000000000000092909216825286905260409020805473ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000006bffffffffffffffffffffffff8516021790555b73ffffffffffffffffffffffffffffffffffffffff84166000908152600186016020526040902080548061143557611435611974565b6000828152602080822060087fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90940193840401805463ffffffff600460078716026101000a0219169055919092557fffffffff0000000000000000000000000000000000000000000000000000000085168252869052604081205580610a6a5760028501546000906114ca9060019061195d565b73ffffffffffffffffffffffffffffffffffffffff861660009081526001808901602052604090912001549091508082146115b857600087600201838154811061151657611516611657565b60009182526020909120015460028901805473ffffffffffffffffffffffffffffffffffffffff909216925082918490811061155457611554611657565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055929091168152600189810190925260409020018190555b866002018054806115cb576115cb611974565b6000828152602080822083017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590920190925573ffffffffffffffffffffffffffffffffffffffff88168252600189810190915260408220015550505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611716576117166116b5565b5060010190565b60005b83811015611738578181015183820152602001611720565b838111156106b85750506000910152565b6000815180845261176181602086016020860161171d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156118be577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8503018652815188850173ffffffffffffffffffffffffffffffffffffffff82511686528482015160038110611845577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b808310156118a95783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611867565b509785019795505050908201906001016117bc565b505073ffffffffffffffffffffffffffffffffffffffff8a169088015286810360408801526118ed8189611749565b9a9950505050505050505050565b6000825161190d81846020870161171d565b9190910192915050565b60208152600061192a6020830184611749565b9392505050565b60006bffffffffffffffffffffffff80831681811415611953576119536116b5565b6001019392505050565b60008282101561196f5761196f6116b5565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212202b18a533b03703e1326000cf2f36b1c6ec631cff163a752d939e5ee79ad2cde364736f6c634300080a0033c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204164642066616365742063616e277420624c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f64654c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e2066", "deployedBytecode": "0x60806040523661000b57005b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6020819052604090912054819073ffffffffffffffffffffffffffffffffffffffff16806100e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f7420657869737460448201526064015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610102573d6000f35b3d6000fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff8481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60005b83518110156103ba5760008482815181106101e1576101e1611657565b60200260200101516020015190506000600281111561020257610202611686565b81600281111561021457610214611686565b14156102635761025e85838151811061022f5761022f611657565b60200260200101516000015186848151811061024d5761024d611657565b6020026020010151604001516106be565b6103a7565b600181600281111561027757610277611686565b14156102c15761025e85838151811061029257610292611657565b6020026020010151600001518684815181106102b0576102b0611657565b602002602001015160400151610a71565b60028160028111156102d5576102d5611686565b141561031f5761025e8583815181106102f0576102f0611657565b60200260200101516000015186848151811061030e5761030e611657565b602002602001015160400151610e2e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e0000000000000000000000000000000000000000000000000060648201526084016100da565b50806103b2816116e4565b9150506101c4565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738383836040516103ee93929190611793565b60405180910390a16104008282610405565b505050565b73ffffffffffffffffffffffffffffffffffffffff82166104b3578051156104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d7074790000000060648201526084016100da565b5050565b6000815111610544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f74206164647265737328302900000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff8216301461058357610583826040518060600160405280602881526020016119a46028913961101b565b6000808373ffffffffffffffffffffffffffffffffffffffff16836040516105ab91906118fb565b600060405180830381855af49150503d80600081146105e6576040519150601f19603f3d011682016040523d82523d6000602084013e6105eb565b606091505b5091509150816106b85780511561063057806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100da9190611917565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560448201527f766572746564000000000000000000000000000000000000000000000000000060648201526084016100da565b50505050565b600081511161074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff8316610813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f652061646472657373283029000000000000000000000000000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001820160205260409020546bffffffffffffffffffffffff8116610858576108588285611056565b60005b8351811015610a6a57600084828151811061087857610878611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529186905260409091205490915073ffffffffffffffffffffffffffffffffffffffff16801561095d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c726561647920657869737473000000000000000000000060648201526084016100da565b7fffffffff000000000000000000000000000000000000000000000000000000008216600081815260208781526040808320805473ffffffffffffffffffffffffffffffffffffffff908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281547fffffffffffffffffffffffff00000000000000000000000000000000000000001617905583610a5281611931565b94505050508080610a62906116e4565b91505061085b565b5050505050565b6000815111610b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff8316610bc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f652061646472657373283029000000000000000000000000000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001820160205260409020546bffffffffffffffffffffffff8116610c0b57610c0b8285611056565b60005b8351811015610a6a576000848281518110610c2b57610c2b611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529186905260409091205490915073ffffffffffffffffffffffffffffffffffffffff908116908716811415610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e000000000000000060648201526084016100da565b610d218582846110e5565b7fffffffff000000000000000000000000000000000000000000000000000000008216600081815260208781526040808320805473ffffffffffffffffffffffffffffffffffffffff908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c94909402939093179092559390925287905281547fffffffffffffffffffffffff00000000000000000000000000000000000000001617905583610e1681611931565b94505050508080610e26906116e4565b915050610c0e565b6000815111610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f2063757400000000000000000000000000000000000000000060648201526084016100da565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c73ffffffffffffffffffffffffffffffffffffffff831615610f84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d75737420626520616464726573732830290000000000000000000060648201526084016100da565b60005b82518110156106b8576000838281518110610fa457610fa4611657565b6020908102919091018101517fffffffff00000000000000000000000000000000000000000000000000000000811660009081529185905260409091205490915073ffffffffffffffffffffffffffffffffffffffff166110068482846110e5565b50508080611013906116e4565b915050610f87565b813b81816106b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100da9190611917565b611078816040518060600160405280602481526020016119cc6024913961101b565b60028201805473ffffffffffffffffffffffffffffffffffffffff90921660008181526001948501602090815260408220860185905594840183559182529290200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b73ffffffffffffffffffffffffffffffffffffffff8216611188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e277420657869737400000000000000000060648201526084016100da565b73ffffffffffffffffffffffffffffffffffffffff821630141561122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e00000000000000000000000000000000000060648201526084016100da565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152602084815260408083205473ffffffffffffffffffffffffffffffffffffffff86168452600180880190935290832054740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692916112b89161195d565b90508082146113ff5773ffffffffffffffffffffffffffffffffffffffff8416600090815260018601602052604081208054839081106112fa576112fa611657565b6000918252602080832060088304015473ffffffffffffffffffffffffffffffffffffffff8916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811061135857611358611657565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790557fffffffff0000000000000000000000000000000000000000000000000000000092909216825286905260409020805473ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000006bffffffffffffffffffffffff8516021790555b73ffffffffffffffffffffffffffffffffffffffff84166000908152600186016020526040902080548061143557611435611974565b6000828152602080822060087fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90940193840401805463ffffffff600460078716026101000a0219169055919092557fffffffff0000000000000000000000000000000000000000000000000000000085168252869052604081205580610a6a5760028501546000906114ca9060019061195d565b73ffffffffffffffffffffffffffffffffffffffff861660009081526001808901602052604090912001549091508082146115b857600087600201838154811061151657611516611657565b60009182526020909120015460028901805473ffffffffffffffffffffffffffffffffffffffff909216925082918490811061155457611554611657565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055929091168152600189810190925260409020018190555b866002018054806115cb576115cb611974565b6000828152602080822083017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590920190925573ffffffffffffffffffffffffffffffffffffffff88168252600189810190915260408220015550505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611716576117166116b5565b5060010190565b60005b83811015611738578181015183820152602001611720565b838111156106b85750506000910152565b6000815180845261176181602086016020860161171d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156118be577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8503018652815188850173ffffffffffffffffffffffffffffffffffffffff82511686528482015160038110611845577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b808310156118a95783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611867565b509785019795505050908201906001016117bc565b505073ffffffffffffffffffffffffffffffffffffffff8a169088015286810360408801526118ed8189611749565b9a9950505050505050505050565b6000825161190d81846020870161171d565b9190910192915050565b60208152600061192a6020830184611749565b9392505050565b60006bffffffffffffffffffffffff80831681811415611953576119536116b5565b6001019392505050565b60008282101561196f5761196f6116b5565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212202b18a533b03703e1326000cf2f36b1c6ec631cff163a752d939e5ee79ad2cde364736f6c634300080a0033", "facets": [ { - "facetAddress": "0x0Ee518212216dc4d3be6A964Fe9b4FfF9383c342", + "facetAddress": "0xE0744E372a685aE1c1a4ec3C5E56524b03582c9B", "functionSelectors": [ "0x58759df7", "0x392b749c", @@ -2281,7 +2281,7 @@ ] }, { - "facetAddress": "0x40c0840BA5a273896F7211945168fb8Bc1a02A83", + "facetAddress": "0x2E24f0528Ffdb09ADCbd6AC8b3321fCC8198C182", "functionSelectors": [ "0x0c6446d5", "0x463bc355", @@ -2289,7 +2289,7 @@ ] }, { - "facetAddress": "0x63F5f4f6653016B08527A4FEa4DFe9800fFD0Fd5", + "facetAddress": "0x837e298D2472337ad89d666eAFb6c272728fd43b", "functionSelectors": [ "0xbf0f2d7e", "0x8f298b2a", @@ -2304,13 +2304,13 @@ ] }, { - "facetAddress": "0x19c7EDBc192a18161161906AD6b1FbEf3C4Ca43E", + "facetAddress": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", "functionSelectors": [ "0x1e77abbc" ] }, { - "facetAddress": "0xa8CE553e9dc807dB4caC12F43D50D19200d9ec84", + "facetAddress": "0xD10B43A07ad4EEcfDd0018eA6CaBeB69F8d0eF4C", "functionSelectors": [ "0x26126d46", "0x59db5bf7", @@ -2346,6 +2346,33 @@ ] } ], + "execute": { + "methodName": "init", + "args": [ + "RankfyInstance", + "0.0.1", + { + "timePerTurn": "604800", + "maxTurns": "8", + "maxPlayersSize": "16", + "minPlayersSize": "5", + "rankTokenAddress": "0xBbDA1841822cc43954FA455aB1cB9DE5F9270894", + "timeToJoin": "1209600", + "gamePrice": { + "type": "BigNumber", + "hex": "0x0de0b6b3a7640000" + }, + "joinGamePrice": { + "type": "BigNumber", + "hex": "0x0de0b6b3a7640000" + }, + "numWinners": "3", + "voteCredits": "14", + "subject": "Music Challenge", + "rankifyToken": "0x21C68Aa0be617ebE09138d185BF2ff804131A8da" + } + ] + }, "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/anvil/RankifyInstanceGameMastersFacet.json b/deployments/anvil/RankifyInstanceGameMastersFacet.json index 92661d6..7056b2a 100644 --- a/deployments/anvil/RankifyInstanceGameMastersFacet.json +++ b/deployments/anvil/RankifyInstanceGameMastersFacet.json @@ -1,5 +1,5 @@ { - "address": "0x40c0840BA5a273896F7211945168fb8Bc1a02A83", + "address": "0x2E24f0528Ffdb09ADCbd6AC8b3321fCC8198C182", "abi": [ { "anonymous": false, @@ -293,28 +293,28 @@ "type": "function" } ], - "transactionHash": "0xa39acd2f9b6d8b9f0fd8f55b63d361506783349156ab42c30bdd59f270a1271c", + "transactionHash": "0x1db98d50b34b261e7e3e18e426794f82f4b22c8379a177aa689c554b666254ad", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", - "from": "0x507c2d32185667156de5B4C440FEEf3800078bDb", + "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", "contractAddress": null, "transactionIndex": 0, "gasUsed": "4425839", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x38414d111866d4a3fc2c00c1cb980bb46f32a5d3431848c047c95198b05f920d", - "transactionHash": "0xa39acd2f9b6d8b9f0fd8f55b63d361506783349156ab42c30bdd59f270a1271c", + "blockHash": "0x1e50952ed052b61810d1ab9918eb61c4f6b1854f438159fbf378ad424905e35d", + "transactionHash": "0x1db98d50b34b261e7e3e18e426794f82f4b22c8379a177aa689c554b666254ad", "logs": [], - "blockNumber": 405, + "blockNumber": 490, "cumulativeGasUsed": "4425839", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "9228a565026522356d85b21c7efc15c0", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"uint256[]\",\"name\":\"scores\",\"type\":\"uint256[]\"}],\"name\":\"GameOver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"LastTurn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"OverTime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"proposalHash\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"proposal\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"score\",\"type\":\"uint256\"}],\"name\":\"ProposalScore\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"commitmentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"proposalEncryptedByGM\",\"type\":\"string\"}],\"name\":\"ProposalSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"scores\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"newProposals\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"proposerIndicies\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[][]\",\"name\":\"votes\",\"type\":\"uint256[][]\"}],\"name\":\"TurnEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"votesHidden\",\"type\":\"string\"}],\"name\":\"VoteSubmitted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[][]\",\"name\":\"votes\",\"type\":\"uint256[][]\"},{\"internalType\":\"string[]\",\"name\":\"newProposals\",\"type\":\"string[]\"},{\"internalType\":\"uint256[]\",\"name\":\"proposerIndicies\",\"type\":\"uint256[]\"}],\"name\":\"endTurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"encryptedProposal\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"commitmentHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"}],\"internalType\":\"struct RankifyInstanceGameMastersFacet.ProposalParams\",\"name\":\"proposalData\",\"type\":\"tuple\"}],\"name\":\"submitProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"encryptedVotes\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"submitVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"endTurn(uint256,uint256[][],string[],uint256[])\":{\"details\":\"Ends the current turn of a game with the provided game ID. `gameId` is the ID of the game. `votes` is the array of votes. `newProposals` is the array of new proposals for the upcoming voting round. `proposerIndicies` is the array of indices of the proposers in the previous voting round. emits a _ProposalScore_ event for each player if the turn is not the first. emits a _TurnEnded_ event. Modifies: - Calls the `_nextTurn` function with `gameId` and `newProposals`. - Resets the number of commitments of the game with `gameId` to 0. - Resets the proposal commitment hash and ongoing proposal of each player in the game with `gameId`. Requirements: - The caller must be a game master of the game with `gameId`. - The game with `gameId` must have started. - The game with `gameId` must not be over. - newProposals array MUST be sorted randomly to ensure privacy votes and proposerIndicies MUST correspond to players array from game.getPlayers()\"},\"submitProposal((uint256,string,bytes32,address))\":{\"details\":\"Submits a proposal for a game. `proposalData` is the proposal data. Requirements: - The game with `proposalData.gameId` must exist. - The caller must be a game master of the game with `proposalData.gameId`.\"},\"submitVote(uint256,string,address)\":{\"details\":\"Submits a vote for a game. `gameId` is the ID of the game. `encryptedVotes` is the encrypted votes. `voter` is the address of the voter. Emits a _VoteSubmitted_ event. Requirements: - The caller must be a game master of the game with `gameId`. - The game with `gameId` must exist. - The game with `gameId` must have started. - The game with `gameId` must not be over. - `voter` must be in the game with `gameId`. - The current turn of the game with `gameId` must be greater than 1.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceGameMastersFacet.sol\":\"RankifyInstanceGameMastersFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../../interfaces/IERC1271.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureChecker {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\\n return\\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x3af3ca86df39aac39a0514c84459d691434a108d2151c8ce9d69f32e315cab80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/CompositeERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"./LockableERC1155.sol\\\";\\n\\n/**\\n * @title CompositeERC1155\\n * @dev An abstract contract that extends LockableERC1155 and provides functionality for composite ERC1155 tokens.\\n * Composite tokens can be \\\"composed\\\" from multiple underlying assets, which however do not change their owner\\n * and in contrast to that use LockableERC1155 standard, which allows to read locked asset BalanceOf, OwnerOf methods correctly\\n */\\nabstract contract CompositeERC1155 is LockableERC1155 {\\n address[] private dimensions;\\n uint256[] private weights;\\n\\n constructor(string memory uri_, address[] memory dimensionTokens, uint256[] memory tokenWeights) ERC1155(uri_) {\\n require(dimensionTokens.length == tokenWeights.length, \\\"Array lengths must be equal\\\");\\n dimensions = dimensionTokens;\\n weights = tokenWeights;\\n }\\n\\n function _mint(address to, uint256 tokenId, uint256 value, bytes memory data) internal virtual override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).lock(to, tokenId, value * weights[i]);\\n }\\n super._mint(to, tokenId, value, data);\\n }\\n\\n function _burn(address from, uint256 id, uint256 amount) internal override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n CompositeERC1155(dimensions[i]).burn(from, id, amount * weights[i]);\\n }\\n super._burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Decomposes a composite ERC1155 token into its individual components.\\n * This function unlocks the specified amount of the composite token from each dimension,\\n * and then burns the specified amount of the composite token from the caller's balance.\\n * @param from The address from which the composite token is being decomposed.\\n * @param id The ID of the composite token being decomposed.\\n * @param amount The amount of the composite token to decompose.\\n */\\n function decompose(address from, uint256 id, uint256 amount) public virtual {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).unlock(from, id, amount * weights[i]);\\n }\\n _burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Burns a specified amount of tokens from the given account.\\n * This will burn all underlying (composite) assets\\n *\\n * Requirements:\\n * - `account` must be the token owner or an approved operator.\\n * - `id` and `value` must be valid token ID and amount to burn.\\n * - All underlying \\\"composite\\\" assets implement burn as well\\n *\\n * @param account The address of the token owner.\\n * @param id The ID of the token to burn.\\n * @param value The amount of tokens to burn.\\n */\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n /**\\n * @dev Retrieves the components of the CompositeERC1155 contract.\\n * @return An array of component addresses and an array of component weights.\\n */\\n function getComponents() public virtual returns (address[] memory, uint256[] memory) {\\n return (dimensions, weights);\\n }\\n}\\n\",\"keccak256\":\"0xad12acae82dd98d6d4375c7c4290667341cb43faa73c6381d9d20094b77fc29e\",\"license\":\"Apache-2.0\"},\"src/abstracts/DiamondReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/**\\n * Author: @Peersky https://github.com/peersky\\n * Adapted this diamond reentrancy guard from:\\n\\n * Authors: Moonstream Engineering (engineering@moonstream.to)\\n * GitHub: https://github.com/bugout-dev/dao\\n */\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\n\\nabstract contract DiamondReentrancyGuard {\\n modifier nonReentrant() {\\n LibReentrancyGuard.ReentrancyGuardStruct storage rgs = LibReentrancyGuard.reentrancyGuardStorage();\\n require(!rgs._entered, \\\"REG: You shall not pass!\\\");\\n rgs._entered = true;\\n _;\\n rgs._entered = false;\\n }\\n}\\n\",\"keccak256\":\"0xfe1f8e71dc63f898ba9ae59193b975352955e0f8c1a694a78cab07df3389cd91\",\"license\":\"Apache-2.0\"},\"src/abstracts/LockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {ILockableERC1155} from \\\"../interfaces/ILockableERC1155.sol\\\";\\nerror insufficient(uint256 id, uint256 balance, uint256 required);\\n\\n/**\\n * @title LockableERC1155\\n * @dev This is an abstract contract that extends the ERC1155 token contract and implements the ILockableERC1155 interface.\\n * It provides functionality to lock and unlock token amounts for specific accounts and IDs.\\n */\\nabstract contract LockableERC1155 is ERC1155, ILockableERC1155 {\\n mapping(address => mapping(uint256 => uint256)) lockedAmounts;\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID.\\n * If the account does not have enough balance to lock the specified amount,\\n * the function will revert with an \\\"insufficient\\\" error message.\\n * Emits a `TokensLocked` event after successfully locking the tokens.\\n * @param account The address of the account to lock tokens for.\\n * @param id The ID of the token to lock.\\n * @param amount The amount of tokens to lock.\\n */\\n function lock(address account, uint256 id, uint256 amount) public virtual {\\n if (balanceOf(account, id) < lockedAmounts[account][id] + amount) require(false, \\\"insufficient\\\");\\n // revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] += amount;\\n emit TokensLocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID.\\n * If the locked amount is less than the specified amount, it reverts with an \\\"insufficient\\\" error message.\\n * Emits a `TokensUnlocked` event after unlocking the tokens.\\n * @param account The address of the account to unlock tokens for.\\n * @param id The ID of the token to unlock.\\n * @param amount The amount of tokens to unlock.\\n */\\n function unlock(address account, uint256 id, uint256 amount) public virtual {\\n if (lockedAmounts[account][id] < amount) require(false, \\\"insufficient\\\"); //revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] -= amount;\\n emit TokensUnlocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Returns the unlocked balance of a specific ERC1155 token for an account.\\n * The unlocked balance is calculated by subtracting the locked amount from the total balance.\\n * @param account The address of the account.\\n * @param id The ID of the ERC1155 token.\\n * @return The unlocked balance of the ERC1155 token for the account.\\n */\\n function unlockedBalanceOf(address account, uint256 id) public view returns (uint256) {\\n return balanceOf(account, id) - lockedAmounts[account][id];\\n }\\n\\n /**\\n * @dev Hook function that is called before any token transfer.\\n * It checks if the transfer is allowed based on the locked amounts of the tokens.\\n * If the transfer is not allowed, it reverts with an error message.\\n * @param operator The address performing the token transfer.\\n * @param from The address from which the tokens are being transferred.\\n * @param to The address to which the tokens are being transferred.\\n * @param ids An array of token IDs being transferred.\\n * @param amounts An array of token amounts being transferred.\\n * @param data Additional data attached to the transfer.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (from != address(0)) {\\n if (lockedAmounts[from][ids[i]] + amounts[i] > balanceOf(from, ids[i])) {\\n require(false, \\\"insufficient\\\");\\n }\\n }\\n }\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x68f61e7bf0aa1edf0c1fbe58004a67856521d882c272542e81b48ebe5a16caca\",\"license\":\"Apache-2.0\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceGameMastersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport \\\"../abstracts/DiamondReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\nimport {RankToken} from \\\"../tokens/RankToken.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\ncontract RankifyInstanceGameMastersFacet is DiamondReentrancyGuard, EIP712 {\\n using LibTBG for uint256;\\n using LibRankify for uint256;\\n using LibTBG for LibTBG.GameInstance;\\n event OverTime(uint256 indexed gameId);\\n event LastTurn(uint256 indexed gameId);\\n event ProposalScore(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n string indexed proposalHash,\\n string proposal,\\n uint256 score\\n );\\n event TurnEnded(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n address[] players,\\n uint256[] scores,\\n string[] newProposals,\\n uint256[] proposerIndicies,\\n uint256[][] votes\\n );\\n\\n event GameOver(uint256 indexed gameId, address[] indexed players, uint256[] indexed scores);\\n\\n event ProposalSubmitted(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n address indexed proposer,\\n bytes32 commitmentHash,\\n string proposalEncryptedByGM\\n );\\n struct ProposalParams {\\n uint256 gameId;\\n string encryptedProposal;\\n bytes32 commitmentHash;\\n address proposer;\\n }\\n\\n event VoteSubmitted(uint256 indexed gameId, uint256 indexed turn, address indexed player, string votesHidden);\\n\\n /**\\n * @dev Handles the end of the game for a player. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Releases the coins for the game with `gameId`, the game creator, the top player, and `player`.\\n */\\n function onPlayersGameEnd(uint256 gameId, address player) private {\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n LibCoinVending.release(bytes32(gameId), game.createdBy, gameId.getLeaderBoard()[0], player);\\n }\\n\\n /**\\n * @dev Submits a vote for a game. `gameId` is the ID of the game. `encryptedVotes` is the encrypted votes. `voter` is the address of the voter.\\n *\\n * Emits a _VoteSubmitted_ event.\\n *\\n * Requirements:\\n *\\n * - The caller must be a game master of the game with `gameId`.\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `voter` must be in the game with `gameId`.\\n * - The current turn of the game with `gameId` must be greater than 1.\\n */\\n function submitVote(uint256 gameId, string memory encryptedVotes, address voter) public {\\n LibRankify.enforceIsGM(gameId, msg.sender);\\n gameId.enforceGameExists();\\n gameId.enforceHasStarted();\\n require(!gameId.isGameOver(), \\\"Game over\\\");\\n gameId.enforceIsPlayingGame(voter);\\n require(gameId.getTurn() > 1, \\\"No proposals exist at turn 1: cannot vote\\\");\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n require(!game.playerVoted[voter], \\\"Already voted\\\");\\n game.numVotesThisTurn += 1;\\n game.playerVoted[voter] = true;\\n gameId.tryPlayerMove(voter);\\n emit VoteSubmitted(gameId, gameId.getTurn(), voter, encryptedVotes);\\n }\\n\\n /**\\n * @dev Submits a proposal for a game. `proposalData` is the proposal data.\\n *\\n * Requirements:\\n *\\n * - The game with `proposalData.gameId` must exist.\\n * - The caller must be a game master of the game with `proposalData.gameId`.\\n */\\n function submitProposal(ProposalParams memory proposalData) public {\\n proposalData.gameId.enforceGameExists();\\n proposalData.gameId.enforceIsGM(msg.sender);\\n require(!proposalData.gameId.isGameOver(), \\\"Game over\\\");\\n proposalData.gameId.enforceHasStarted();\\n\\n IRankifyInstanceCommons.RInstance storage game = proposalData.gameId.getGameStorage();\\n require(LibTBG.getPlayersGame(proposalData.proposer) == proposalData.gameId, \\\"not a player\\\");\\n // require(!proposalData.gameId.isLastTurn(), \\\"Cannot propose in last turn\\\");\\n require(bytes(proposalData.encryptedProposal).length != 0, \\\"Cannot propose empty\\\");\\n require(game.proposalCommitmentHashes[proposalData.proposer] == \\\"\\\", \\\"Already proposed!\\\");\\n uint256 turn = proposalData.gameId.getTurn();\\n game.proposalCommitmentHashes[proposalData.proposer] = proposalData.commitmentHash;\\n game.numCommitments += 1;\\n proposalData.gameId.tryPlayerMove(proposalData.proposer);\\n emit ProposalSubmitted(\\n proposalData.gameId,\\n turn,\\n proposalData.proposer,\\n proposalData.commitmentHash,\\n proposalData.encryptedProposal\\n );\\n }\\n\\n /**\\n * @dev Handles the actions after the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\\n *\\n * Modifies:\\n *\\n * - Sets the ongoing proposals of the game with `gameId` to `newProposals`.\\n * - Increments the number of ongoing proposals of the game with `gameId` by the number of `newProposals`.\\n */\\n function _afterNextTurn(uint256 gameId, string[] memory newProposals) private {\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n for (uint256 i = 0; i < newProposals.length; i++) {\\n game.ongoingProposals[i] = newProposals[i];\\n game.numOngoingProposals += 1;\\n }\\n }\\n\\n /**\\n * @dev Handles the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\\n *\\n * Emits an {OverTime_ event if the game is in the last turn and overtime.\\n * emits a _LastTurn_ event if the game is in the last turn.\\n * emits a _GameOver_ event if the game is over.\\n *\\n * Modifies:\\n *\\n * - Calls the `_afterNextTurn` function with `gameId` and `newProposals`.\\n */\\n function _nextTurn(uint256 gameId, string[] memory newProposals) private {\\n (bool _isLastTurn, bool _isOvertime, bool _isGameOver) = gameId.nextTurn();\\n if (_isLastTurn && _isOvertime) {\\n emit OverTime(gameId);\\n }\\n if (_isLastTurn) {\\n emit LastTurn(gameId);\\n }\\n if (_isGameOver) {\\n uint256[] memory finalScores = gameId.closeGame(LibDiamond.contractOwner(), onPlayersGameEnd);\\n address[] memory players = gameId.getPlayers();\\n emit GameOver(gameId, players, finalScores);\\n }\\n _afterNextTurn(gameId, newProposals);\\n }\\n\\n /**\\n * @dev Ends the current turn of a game with the provided game ID. `gameId` is the ID of the game. `votes` is the array of votes. `newProposals` is the array of new proposals for the upcoming voting round. `proposerIndicies` is the array of indices of the proposers in the previous voting round.\\n *\\n * emits a _ProposalScore_ event for each player if the turn is not the first.\\n * emits a _TurnEnded_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `_nextTurn` function with `gameId` and `newProposals`.\\n * - Resets the number of commitments of the game with `gameId` to 0.\\n * - Resets the proposal commitment hash and ongoing proposal of each player in the game with `gameId`.\\n *\\n * Requirements:\\n *\\n * - The caller must be a game master of the game with `gameId`.\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - newProposals array MUST be sorted randomly to ensure privacy\\n * votes and proposerIndicies MUST correspond to players array from game.getPlayers()\\n */\\n function endTurn(\\n uint256 gameId,\\n uint256[][] memory votes,\\n string[] memory newProposals, //REFERRING TO UPCOMING VOTING ROUND\\n uint256[] memory proposerIndicies //REFERRING TO game.players index in PREVIOUS VOTING ROUND\\n ) public {\\n gameId.enforceIsGM(msg.sender);\\n gameId.enforceHasStarted();\\n gameId.enforceIsNotOver();\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n uint256 turn = gameId.getTurn();\\n\\n address[] memory players = gameId.getPlayers();\\n if (turn != 1) {\\n (, uint256[] memory roundScores) = gameId.calculateScoresQuadratic(votes, proposerIndicies);\\n for (uint256 i = 0; i < players.length; i++) {\\n string memory proposal = game.ongoingProposals[proposerIndicies[i]];\\n emit ProposalScore(gameId, turn, proposal, proposal, roundScores[i]);\\n }\\n }\\n (, uint256[] memory scores) = gameId.getScores();\\n emit TurnEnded(gameId, gameId.getTurn(), players, scores, newProposals, proposerIndicies, votes);\\n\\n // Clean up game instance for upcoming round\\n\\n game.numCommitments = 0;\\n for (uint256 i = 0; i < players.length; i++) {\\n game.proposalCommitmentHashes[players[i]] = bytes32(0);\\n game.ongoingProposals[i] = \\\"\\\";\\n game.playerVoted[players[i]] = false;\\n game.votesHidden[players[i]].hash = bytes32(0);\\n }\\n // This data is to needed to correctly detetermine \\\"PlayerMove\\\" conditions during next turn\\n game.numVotesPrevTurn = game.numVotesThisTurn;\\n game.numVotesThisTurn = 0;\\n game.numPrevProposals = game.numOngoingProposals;\\n game.numOngoingProposals = 0;\\n\\n _nextTurn(gameId, newProposals);\\n }\\n}\\n\",\"keccak256\":\"0xb589e87986d2a935bae11c1c6720d7c9555bb50e2c707f5ee8737263a4ce6550\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef038fdedc9d4857f9f190562c07849c9813fd4ae927a4e81cef94a29a3f5ed\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * ***WARNING*** This function is unused in the current implementation of the library.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x01cc4615c50c7ab606c54ea358f57db5fd6273518983a5659b21edc771aaa037\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/tokens/RankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/CompositeERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\npragma solidity ^0.8.20;\\n\\ncontract RankToken is CompositeERC1155, Ownable, IRankToken {\\n string private _contractURI;\\n mapping(address => uint256) public rank;\\n uint256 public topRank;\\n address private _rankingInstance;\\n uint256 _levelUpThreshold;\\n\\n modifier onlyRankingInstance() {\\n require(msg.sender == _rankingInstance, \\\"only ranking contract can do that\\\");\\n _;\\n }\\n\\n constructor(\\n string memory uri_,\\n address owner_,\\n string memory cURI,\\n uint256 levelUpThreshold,\\n address[] memory components,\\n uint256[] memory componentWeights\\n ) CompositeERC1155(uri_, components, componentWeights) {\\n require(owner_ != address(0), \\\"must specify owner of the contract\\\");\\n _contractURI = cURI;\\n _levelUpThreshold = levelUpThreshold;\\n transferOwnership(owner_);\\n }\\n\\n function getRankingInstance() public view returns (address) {\\n return _rankingInstance;\\n }\\n\\n function contractURI() public view returns (string memory) {\\n return _contractURI;\\n }\\n\\n function setURI(string memory uri_) public onlyOwner {\\n _setURI(uri_);\\n }\\n\\n function setContractURI(string memory uri_) public onlyOwner {\\n _contractURI = uri_;\\n }\\n\\n event Leader(address indexed account, uint256 indexed rank);\\n\\n function _mintRank(address to, uint256 amount, uint256 level, bytes memory data) private {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amount != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(level != 0, \\\"RankToken->mint: pool id not specified\\\");\\n if (level > topRank) {\\n topRank = level;\\n emit Leader(to, level);\\n }\\n _mint(to, level, amount, data);\\n }\\n\\n function mint(address to, uint256 amount, uint256 level, bytes memory data) public onlyRankingInstance {\\n _mintRank(to, amount, level, data);\\n }\\n\\n function updateRankingInstance(address newRankingInstance) public onlyOwner {\\n require(newRankingInstance != address(0), \\\"must specify ranking instance\\\");\\n _rankingInstance = newRankingInstance;\\n emit RankingInstanceUpdated(newRankingInstance);\\n }\\n\\n function lock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.lock(account, id, amount);\\n }\\n\\n function unlock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.unlock(account, id, amount);\\n }\\n\\n function batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public onlyRankingInstance {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amounts.length != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(ids.length != 0, \\\"RankToken->mint: pool id not specified\\\");\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function levelUp(address to, uint256 level, bytes memory data) public {\\n require(to == msg.sender || msg.sender == _rankingInstance, \\\"levelUp: Not permitted\\\");\\n _burn(to, level, _levelUpThreshold);\\n _mintRank(to, 1, level, data);\\n emit LevelUp(to, level);\\n }\\n\\n function findNewRank(address account, uint256 oldRank) public view returns (uint256) {\\n for (uint256 i = oldRank; i > 0; i--) {\\n uint256 _balanceTemp = balanceOf(account, i);\\n if (_balanceTemp > 0) return i;\\n }\\n return 0;\\n }\\n\\n event RankUpdated(address indexed account, uint256 indexed rank);\\n\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (rank[to] < ids[i] && amounts[i] != 0) {\\n rank[to] = ids[i];\\n emit RankUpdated(to, ids[i]);\\n }\\n if (from != address(0) && (rank[from] != findNewRank(from, rank[from]))) {\\n uint256 newRankFrom = findNewRank(from, rank[from]);\\n rank[from] = newRankFrom;\\n emit RankUpdated(from, newRankFrom);\\n }\\n\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n }\\n\\n //ToDo: Rename in to rankOf(address account)\\n function getAccountRank(address account) external view returns (uint256) {\\n return rank[account];\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC1155) returns (bool) {\\n return interfaceId == type(IRankToken).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x2a333824a5509334058ab6ac8d92fb32a04436f9e15aca1ea1de60647996f7f5\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50614f4e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630c6446d514610046578063463bc3551461005b5780636a9947351461006e575b600080fd5b61005961005436600461435d565b610081565b005b61005961006936600461448a565b610477565b61005961007c366004614532565b6107d1565b61008b8433610ac3565b61009484610b7f565b61009d84610c2a565b60006100a885610c9d565b60008681527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101549192506100e587610cd8565b9050816001146102465760006100fc888887610d14565b91505060005b825181101561024357600085600201600088848151811061012557610125614589565b602002602001015181526020019081526020016000208054610146906145b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610172906145b8565b80156101bf5780601f10610194576101008083540402835291602001916101bf565b820191906000526020600020905b8154815290600101906020018083116101a257829003601f168201915b50505050509050806040516101d4919061462f565b6040518091039020858b7f71cc117353a39d910a72175a56496eefb857568810a5f5b11079400201be4dd48487878151811061021257610212614589565b6020026020010151604051610228929190614695565b60405180910390a4508061023b816146e6565b915050610102565b50505b600061025188611001565b91505061028c8860009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015490565b887f69a9400160c8f6e71eb8c0ab9c5824e20304af8146719a7625c9d15675ebb6d384848a8a8d6040516102c49594939291906147f6565b60405180910390a36000600685018190555b8251811015610445576000801b8560050160008584815181106102fb576102fb614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060405180602001604052806000815250856002016000838152602001908152602001600020908161037291906148e8565b50600085600c01600085848151811061038d5761038d614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000801b85600701600085848151811061040257610402614589565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020558061043d816146e6565b9150506102d6565b50600a84018054600b86015560009081905560038501805460048701555561046d8887611115565b5050505050505050565b805161048290611262565b805161048e9033610ac3565b8051610499906112d9565b15610505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b805161051090610b7f565b600061051f8260000151610c9d565b8251606084015173ffffffffffffffffffffffffffffffffffffffff1660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f366020526040902054919250146105d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206120706c61796572000000000000000000000000000000000000000060448201526064016104fc565b816020015151600003610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f742070726f706f736520656d70747900000000000000000000000060448201526064016104fc565b606082015173ffffffffffffffffffffffffffffffffffffffff166000908152600582016020526040902054156106d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f416c72656164792070726f706f7365642100000000000000000000000000000060448201526064016104fc565b815160009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060010154604080850151606086015173ffffffffffffffffffffffffffffffffffffffff1660009081526005860160205291822055600684018054929350600192909190610754908490614a02565b9091555050606083015183516107699161137b565b50826060015173ffffffffffffffffffffffffffffffffffffffff168184600001517f525b2e06a8f927c08033ec5d6334d7796bbea62d2d4f0486fe60196d4fe6d0ad866040015187602001516040516107c4929190614a15565b60405180910390a4505050565b6107db8333610ac3565b6107e483611262565b6107ed83610b7f565b6107f6836112d9565b1561085d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b6108678382611482565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060019081015411610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4e6f2070726f706f73616c73206578697374206174207475726e20313a20636160448201527f6e6e6f7420766f7465000000000000000000000000000000000000000000000060648201526084016104fc565b600061093284610c9d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c8201602052604090205490915060ff16156109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f416c726561647920766f7465640000000000000000000000000000000000000060448201526064016104fc565b600181600a0160008282546109dc9190614a02565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600c82016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a3b848361137b565b5060008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015473ffffffffffffffffffffffffffffffffffffffff831690857f70a202954fc6b6d8015f8bcfbc543189e19810d2e7e964e655ab5922d1ac5b4e86604051610ab59190614a2e565b60405180910390a450505050565b610acc82611262565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4f6e6c792067616d65206d61737465720000000000000000000000000000000060448201526064016104fc565b5050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812090829003610bbc57610bbc614a41565b600481015460ff16610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f47616d6520686173206e6f74207965742073746172746564000000000000000060448201526064016104fc565b610c33816112d9565b15610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b50565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090610cd160058201611556565b6060806000610d2286610cd8565b90506000815167ffffffffffffffff811115610d4057610d40614142565b604051908082528060200260200182016040528015610d69578160200160208202803683370190505b5090506000825167ffffffffffffffff811115610d8857610d88614142565b604051908082528060200260200182016040528015610db1578160200160208202803683370190505b5090506000835167ffffffffffffffff811115610dd057610dd0614142565b604051908082528060200260200182016040528015610df9578160200160208202803683370190505b5090506000610e06611563565b90506000610e138b610c9d565b905060005b8651811015610ebd5781600c016000888381518110610e3957610e39614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16848281518110610e9b57610e9b614589565b9115156020928302919091019091015280610eb5816146e6565b915050610e18565b5060068201548951604080516060810182526005860154815260208101849052600786015491810191909152610ef89290918d91879161158c565b935060005b8651811015610fef5786518a8281518110610f1a57610f1a614589565b60200260200101511015610fdd57848181518110610f3a57610f3a614589565b6020026020010151610f6e888381518110610f5757610f57614589565b60200260200101518e61182f90919063ffffffff16565b610f789190614a02565b868281518110610f8a57610f8a614589565b602002602001018181525050610fdd878281518110610fab57610fab614589565b6020026020010151878381518110610fc557610fc5614589565b60200260200101518e6118879092919063ffffffff16565b80610fe7816146e6565b915050610efd565b50939a92995091975050505050505050565b606080600061100f84610cd8565b90506000815167ffffffffffffffff81111561102d5761102d614142565b604051908082528060200260200182016040528015611056578160200160208202803683370190505b50905060005b825181101561110a576110db8684838151811061107b5761107b614589565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b8282815181106110ed576110ed614589565b602090810291909101015280611102816146e6565b91505061105c565b509094909350915050565b600080600061112385611952565b9250925092508280156111335750815b156111645760405185907f16b81a8b7a63ff74301aeb7a5b3048ff92880ec2bb0773136ed953bf4ef6f47390600090a25b82156111965760405185907f355ab9c54569d91a1467b11b130e91c3f6c15c3c50c7225177cfaf66ba44ddd090600090a25b80156112515760006111e96111df7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b8790611b01611b59565b905060006111f687610cd8565b9050816040516112069190614a70565b60405180910390208160405161121c9190614aa6565b6040519081900381209089907f310cab2765035ece7f5c89e2f74e216e41485f0911e38063d06de80c47e14b7e90600090a450505b61125b8585611ceb565b5050505050565b61126a611d73565b61127381611e06565b610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e640000000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156113625750600b81015460ff16155b15611371575060019392505050565b5060009392505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206001015460006113b6611563565b905060006113c386610c9d565b90506001808481036113d457600091505b6007840154600484015410156113e957600091505b6001828015611420575073ffffffffffffffffffffffffffffffffffffffff88166000908152600c8501602052604090205460ff16155b15611429575060005b81801561145b575073ffffffffffffffffffffffffffffffffffffffff88166000908152600585016020526040902054155b15611464575060005b8015611474576114748989611e62565b955050505050505b92915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908314611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b505050565b60606000610cd1836120e7565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261147c565b606060008267ffffffffffffffff8111156115a9576115a9614142565b6040519080825280602002602001820160405280156115d2578160200160208202803683370190505b5090506000865167ffffffffffffffff8111156115f1576115f1614142565b60405190808252806020026020018201604052801561161a578160200160208202803683370190505b50905060005b8481101561182257600083828151811061163c5761163c614589565b60200260200101818152505060005b885181101561180f57600089828151811061166857611668614589565b6020026020010151905088828151811061168457611684614589565b60200260200101516116e157878584815181106116a3576116a3614589565b602002602001018181516116b79190614a02565b9052508a5184518590849081106116d0576116d0614589565b6020026020010181815250506117fc565b8083815181106116f3576116f3614589565b602002602001015185848151811061170d5761170d614589565b602002602001018181516117219190614a02565b905250805160029082908590811061173b5761173b614589565b602002602001015161174d9190614c06565b84838151811061175f5761175f614589565b602002602001018181516117739190614a02565b9052508a51845185908490811061178c5761178c614589565b602002602001015111156117fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f7200000000000000000000000060448201526064016104fc565b5080611807816146e6565b91505061164b565b508061181a816146e6565b915050611620565b5090979650505050505050565b60009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206118be8484612143565b611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f706c61796572206e6f7420696e20612067616d6500000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff9092166000908152600990920160205260409091205550565b6000806000611960846121c2565b6119c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6578745475726e2d3e43616e456e644561726c79000000000000000000000060448201526064016104fc565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206119fc8161224b565b6001816001016000828254611a119190614a02565b90915550504260028201556000611a27866122da565b90508080611a395750600b82015460ff165b15611a7c576000611a4987612361565b600b840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055505b611a85866112d9565b600483018054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055611ac586612452565b508051611adb90600c85019060208401906140a3565b5050600b82015460049092015490945060ff918216935061010090041690509193909250565b6000611b0c83610c9d565b600181015490915061155190849073ffffffffffffffffffffffffffffffffffffffff16611b3982612489565b600081518110611b4b57611b4b614589565b602002602001015185612529565b6060611b6484611262565b611b7684611b7186612489565b61258c565b6000611b8185611001565b9150506000611b8f86610cd8565b905060005b8151811015611bf957611bc087838381518110611bb357611bb3614589565b6020026020010151612630565b611be787838381518110611bd657611bd6614589565b60200260200101518763ffffffff16565b80611bf1816146e6565b915050611b94565b506000611c04611563565b600181015481548451600284015493945073ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb928a9291611c419190614c15565b611c4b9190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdf9190614c2c565b50919695505050505050565b6000611cf683610c9d565b905060005b8251811015611d6d57828181518110611d1657611d16614589565b60200260200101518260020160008381526020019081526020016000209081611d3f91906148e8565b506001826003016000828254611d559190614a02565b90915550819050611d65816146e6565b915050611cfb565b50505050565b6000611d7d611563565b600481015490915074010000000000000000000000000000000000000000900460ff16610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a6564000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff1615611e595750600192915050565b50600092915050565b81611e6c816126f7565b15611ed3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f6e6c79496e5475726e54696d65202d3e207475726e2074696d65646f75740060448201526064016104fc565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020611f0984610b7f565b611f1284610c2a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260078201602052604090205460ff1615611fa4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c7265616479206d6164652061206d6f76650000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908514612073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600783016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600884018054919290916120db908490614a02565b90915550505050505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561213757602002820191906000526020600020905b815481526020019060010190808311612123575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9084146121b75760006121ba565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060006121fd8260050161279a565b82600801541461220e576000612211565b60015b600483015490915060ff16158061222c575061222c846112d9565b1561223b575060009392505050565b80806113625750611362846127a4565b60005b61225a8260050161279a565b8110156122cf5760006122706005840183612818565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550806122c7816146e6565b91505061224e565b506000600890910155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92919003611371575060019392505050565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d818061238f85611001565b915091506123ac816000600184516123a79190614c4e565b612824565b60005b600183516123bd9190614c4e565b8110156124465760058401546123d590600190614c4e565b811161242f57816123e7826001614a02565b815181106123f7576123f7614589565b602002602001015182828151811061241157612411614589565b60200260200101510361242a5750600195945050505050565b612434565b612446565b8061243e816146e6565b9150506123af565b50600095945050505050565b60608060008061246185611001565b9150915061247f828260006001855161247a9190614c4e565b6129a4565b9094909350915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060609190600c810180546040805160208084028201810190925282815293945083018282801561251c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116124f1575b5050505050915050919050565b600061257e8560408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061125b81858585612baf565b600061259783610c9d565b905060006125a3611563565b60048101549091506125ce908590859073ffffffffffffffffffffffffffffffffffffffff16612c5e565b60005b600883015481101561125b5761261e85858560080184815481106125f7576125f7614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612c5e565b80612628816146e6565b9150506125d1565b61263982611262565b6126438282612f1e565b600061264d611563565b9050600061265a84610c9d565b9050600181600001541115611d6d578054600483015461269191859173ffffffffffffffffffffffffffffffffffffffff1661312a565b60005b600882015481101561125b576126e58483600001548460080184815481106126be576126be614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1661312a565b806126ef816146e6565b915050612694565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908360000361275657612756614a41565b600481015460ff16151560011461276f5761276f614a41565b600281015482546127809190614a02565b4211612790575060009392505050565b5060019392505050565b600061147c825490565b6000806127b0836126f7565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806127f957506127f9846112d9565b15612808575060009392505050565b8115611371575060019392505050565b6000610cd183836131b8565b8181808203612834575050505050565b60008560026128438787614c61565b61284d9190614c81565b6128579087614d10565b8151811061286757612867614589565b602002602001015190505b818313612976575b8086848151811061288d5761288d614589565b602002602001015111156128ad57826128a581614d38565b93505061287a565b8582815181106128bf576128bf614589565b60200260200101518111156128e057816128d881614d69565b9250506128ad565b818313612971578582815181106128f9576128f9614589565b602002602001015186848151811061291357612913614589565b602002602001015187858151811061292d5761292d614589565b6020026020010188858151811061294657612946614589565b6020908102919091010191909152528261295f81614d38565b935050818061296d90614d69565b9250505b612872565b8185121561298957612989868684612824565b8383121561299c5761299c868486612824565b505050505050565b81818082036129b4575050611d6d565b60008560026129c38787614c61565b6129cd9190614c81565b6129d79087614d10565b815181106129e7576129e7614589565b602002602001015190505b818313612b7e575b80868481518110612a0d57612a0d614589565b60200260200101511115612a2d5782612a2581614d38565b9350506129fa565b858281518110612a3f57612a3f614589565b6020026020010151811115612a605781612a5881614d69565b925050612a2d565b818313612b7957858281518110612a7957612a79614589565b6020026020010151868481518110612a9357612a93614589565b6020026020010151878581518110612aad57612aad614589565b60200260200101888581518110612ac657612ac6614589565b6020026020010182815250828152505050868281518110612ae957612ae9614589565b6020026020010151878481518110612b0357612b03614589565b6020026020010151888581518110612b1d57612b1d614589565b60200260200101898581518110612b3657612b36614589565b73ffffffffffffffffffffffffffffffffffffffff93841660209182029290920101529116905282612b6781614d38565b9350508180612b7590614d69565b9250505b6129f2565b81851215612b9257612b92878787856129a4565b83831215612ba657612ba6878785876129a4565b50505050505050565b836008015484600701548560060154612bc89190614a02565b10612c2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f2072656c6561736500000060448201526064016104fc565b612c3e843085856000866131e2565b6001846007016000828254612c539190614a02565b909155505050505050565b6000612c6984610c9d565b905060008290508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600081518110612ca057612ca0614589565b602002602001015185600001546001612cb99190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600181518110612d8a57612d8a614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526002606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612e2057600080fd5b505af1158015612e34573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600281518110612e6857612e68614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015612eff57600080fd5b505af1158015612f13573d6000803e3d6000fd5b505050505050505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90612f7684611e06565b612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f742065786973740000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600983016020526040902054841461306c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d65000000000000000000000000000000000060448201526064016104fc565b600481015460ff16158061308f5750600481015460ff6101009091041615156001145b6130f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e636520737461727465640000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561125b6005820184613586565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c6890606401600060405180830381600087803b1580156131a457600080fd5b505af115801561046d573d6000803e3d6000fd5b60008260000182815481106131cf576131cf614589565b9060005260206000200154905092915050565b3073ffffffffffffffffffffffffffffffffffffffff86160361334c5760028601541561325157600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f1935050505015801561324f573d6000803e3d6000fd5b505b6004860154156132a357600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f193505050501580156132a1573d6000803e3d6000fd5b505b6005860154156132f557600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f193505050501580156132f3573d6000803e3d6000fd5b505b60038601541561334757600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613345573d6000803e3d6000fd5b505b6133f0565b6003860154600587015460048801546002890154600093929161336e91614a02565b6133789190614a02565b6133829190614a02565b9050803410156133ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f7700000000000000000000000000000060448201526064016104fc565b505b60005b600a870154811015612ba657600087600a01828154811061341657613416614589565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061345257613452614589565b90600052602060002001549050600089600901848154811061347657613476614589565b60009182526020808320908204015460ff601f9092166101000a90041691508a818360028111156134a9576134a9614dc0565b60028111156134ba576134ba614dc0565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561350957613509614dc0565b036135225761351d84828c8c8c8c8c6135a8565b61356f565b600282600281111561353657613536614dc0565b036135465761351d84828c613720565b600182600281111561355a5761355a614dc0565b0361356f5761356f8484838d8d8d8d8d6138eb565b50505050808061357e906146e6565b9150506133f3565b6000610cd18373ffffffffffffffffffffffffffffffffffffffff8416613cd2565b6135bb8786838960020160010154613dcc565b6135ce8786848960040160010154613dcc565b6135e18786868960060160010154613dcc565b6135f48786858960080160010154613dcc565b600186015487908015801590613620575073ffffffffffffffffffffffffffffffffffffffff87163014155b15612f13576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015613694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b89190614def565b1015612f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e7300000000000000000060448201526064016104fc565b6003820154839015801561373657506005830154155b801561374457506007830154155b801561375257506009830154155b6137b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f72746564000060448201526064016104fc565b6001830154158015906137e1575073ffffffffffffffffffffffffffffffffffffffff82163014155b15611d6d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015613856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061387a9190614def565b600185015490915081101561125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e63650000000000000060448201526064016104fc565b6001860154889080156139ff576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa15801561396d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139919190614def565b9050818110156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c69640000000060448201526064016104fc565b505b5060078701548015613a85578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b8152600401613a52959493929190614e08565b600060405180830381600087803b158015613a6c57600080fd5b505af1158015613a80573d6000803e3d6000fd5b505050505b5060098701548015613b0b578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b8152600401613ad8959493929190614e08565b600060405180830381600087803b158015613af257600080fd5b505af1158015613b06573d6000803e3d6000fd5b505050505b5060058701548015613c405773ffffffffffffffffffffffffffffffffffffffff8416613bc6576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b158015613ba957600080fd5b505af1158015613bbd573d6000803e3d6000fd5b50505050613c40565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b8152600401613c0d959493929190614e08565b600060405180830381600087803b158015613c2757600080fd5b505af1158015613c3b573d6000803e3d6000fd5b505050505b5060038701548015613cc6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b8152600401613c93959493929190614e08565b600060405180830381600087803b158015613cad57600080fd5b505af1158015613cc1573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015613dbb576000613cf6600183614c4e565b8554909150600090613d0a90600190614c4e565b9050818114613d6f576000866000018281548110613d2a57613d2a614589565b9060005260206000200154905080876000018481548110613d4d57613d4d614589565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613d8057613d80614ee9565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061147c565b600091505061147c565b5092915050565b83811561125b573073ffffffffffffffffffffffffffffffffffffffff851603613f315773ffffffffffffffffffffffffffffffffffffffff831615613eac576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190614c2c565b5061125b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015613f1457600080fd5b505af1158015613f28573d6000803e3d6000fd5b5050505061125b565b73ffffffffffffffffffffffffffffffffffffffff831615613fb0576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401613e63565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af115801561402b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061404f9190614c2c565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401612ee5565b82805482825590600052602060002090810192821561411d579160200282015b8281111561411d57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906140c3565b5061412992915061412d565b5090565b5b80821115614129576000815560010161412e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b8576141b8614142565b604052919050565b600067ffffffffffffffff8211156141da576141da614142565b5060051b60200190565b600082601f8301126141f557600080fd5b8135602061420a614205836141c0565b614171565b82815260059290921b8401810191818101908684111561422957600080fd5b8286015b84811015614244578035835291830191830161422d565b509695505050505050565b600082601f83011261426057600080fd5b813567ffffffffffffffff81111561427a5761427a614142565b6142ab60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614171565b8181528460208386010111156142c057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126142ee57600080fd5b813560206142fe614205836141c0565b82815260059290921b8401810191818101908684111561431d57600080fd5b8286015b8481101561424457803567ffffffffffffffff8111156143415760008081fd5b61434f8986838b010161424f565b845250918301918301614321565b6000806000806080858703121561437357600080fd5b8435935060208086013567ffffffffffffffff8082111561439357600080fd5b818801915088601f8301126143a757600080fd5b81356143b5614205826141c0565b81815260059190911b8301840190848101908b8311156143d457600080fd5b8585015b8381101561440c578035858111156143f05760008081fd5b6143fe8e89838a01016141e4565b8452509186019186016143d8565b5097505050604088013592508083111561442557600080fd5b61443189848a016142dd565b9450606088013592508083111561444757600080fd5b5050614455878288016141e4565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff8116811461448557600080fd5b919050565b60006020828403121561449c57600080fd5b813567ffffffffffffffff808211156144b457600080fd5b90830190608082860312156144c857600080fd5b6040516080810181811083821117156144e3576144e3614142565b604052823581526020830135828111156144fc57600080fd5b6145088782860161424f565b6020830152506040830135604082015261452460608401614461565b606082015295945050505050565b60008060006060848603121561454757600080fd5b83359250602084013567ffffffffffffffff81111561456557600080fd5b6145718682870161424f565b92505061458060408501614461565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c908216806145cc57607f821691505b602082108103614605577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60005b8381101561462657818101518382015260200161460e565b50506000910152565b6000825161464181846020870161460b565b9190910192915050565b6000815180845261466381602086016020860161460b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815260006146a8604083018561464b565b90508260208301529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b5060010190565b600081518084526020808501945080840160005b8381101561474e57815187529582019590820190600101614732565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a157828403895261478f84835161464b565b98850198935090840190600101614777565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a15782840389526147e484835161471e565b988501989350908401906001016147cc565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561484557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614813565b50505083810382850152614859818961471e565b915050828103604084015261486e8187614759565b90508281036060840152614882818661471e565b9050828103608084015261489681856147ae565b98975050505050505050565b601f82111561155157600081815260208120601f850160051c810160208610156148c95750805b601f850160051c820191505b8181101561299c578281556001016148d5565b815167ffffffffffffffff81111561490257614902614142565b6149168161491084546145b8565b846148a2565b602080601f83116001811461496957600084156149335750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561299c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156149b657888601518255948401946001909101908401614997565b50858210156149f257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561147c5761147c6146b7565b8281526040602082015260006121ba604083018461464b565b602081526000610cd1602083018461464b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b815160009082906020808601845b83811015614a9a57815185529382019390820190600101614a7e565b50929695505050505050565b815160009082906020808601845b83811015614a9a57815173ffffffffffffffffffffffffffffffffffffffff1685529382019390820190600101614ab4565b600181815b80851115614b3f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b2557614b256146b7565b80851615614b3257918102915b93841c9390800290614aeb565b509250929050565b600082614b565750600161147c565b81614b635750600061147c565b8160018114614b795760028114614b8357614b9f565b600191505061147c565b60ff841115614b9457614b946146b7565b50506001821b61147c565b5060208310610133831016604e8410600b8410161715614bc2575081810a61147c565b614bcc8383614ae6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614bfe57614bfe6146b7565b029392505050565b6000610cd160ff841683614b47565b808202811582820484141761147c5761147c6146b7565b600060208284031215614c3e57600080fd5b81518015158114610cd157600080fd5b8181038181111561147c5761147c6146b7565b8181036000831280158383131683831282161715613dc557613dc56146b7565b600082614cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615614d0b57614d0b6146b7565b500590565b8082018281126000831280158216821582161715614d3057614d306146b7565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b60007f80000000000000000000000000000000000000000000000000000000000000008203614d9a57614d9a6146b7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215614e0157600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a06080850152600091508454614e4f816145b8565b8060a087015260c0600180841660008114614e715760018114614ea957614ed7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650614ed7565b896000528560002060005b85811015614ecf5781548b8201860152908301908701614eb4565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f0115792916c9ff2ad70ba954d7e3b99a4342e7e6981951acfdcf7a491f5db5d64736f6c63430008140033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630c6446d514610046578063463bc3551461005b5780636a9947351461006e575b600080fd5b61005961005436600461435d565b610081565b005b61005961006936600461448a565b610477565b61005961007c366004614532565b6107d1565b61008b8433610ac3565b61009484610b7f565b61009d84610c2a565b60006100a885610c9d565b60008681527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101549192506100e587610cd8565b9050816001146102465760006100fc888887610d14565b91505060005b825181101561024357600085600201600088848151811061012557610125614589565b602002602001015181526020019081526020016000208054610146906145b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610172906145b8565b80156101bf5780601f10610194576101008083540402835291602001916101bf565b820191906000526020600020905b8154815290600101906020018083116101a257829003601f168201915b50505050509050806040516101d4919061462f565b6040518091039020858b7f71cc117353a39d910a72175a56496eefb857568810a5f5b11079400201be4dd48487878151811061021257610212614589565b6020026020010151604051610228929190614695565b60405180910390a4508061023b816146e6565b915050610102565b50505b600061025188611001565b91505061028c8860009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015490565b887f69a9400160c8f6e71eb8c0ab9c5824e20304af8146719a7625c9d15675ebb6d384848a8a8d6040516102c49594939291906147f6565b60405180910390a36000600685018190555b8251811015610445576000801b8560050160008584815181106102fb576102fb614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060405180602001604052806000815250856002016000838152602001908152602001600020908161037291906148e8565b50600085600c01600085848151811061038d5761038d614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000801b85600701600085848151811061040257610402614589565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020558061043d816146e6565b9150506102d6565b50600a84018054600b86015560009081905560038501805460048701555561046d8887611115565b5050505050505050565b805161048290611262565b805161048e9033610ac3565b8051610499906112d9565b15610505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b805161051090610b7f565b600061051f8260000151610c9d565b8251606084015173ffffffffffffffffffffffffffffffffffffffff1660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f366020526040902054919250146105d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206120706c61796572000000000000000000000000000000000000000060448201526064016104fc565b816020015151600003610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f742070726f706f736520656d70747900000000000000000000000060448201526064016104fc565b606082015173ffffffffffffffffffffffffffffffffffffffff166000908152600582016020526040902054156106d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f416c72656164792070726f706f7365642100000000000000000000000000000060448201526064016104fc565b815160009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060010154604080850151606086015173ffffffffffffffffffffffffffffffffffffffff1660009081526005860160205291822055600684018054929350600192909190610754908490614a02565b9091555050606083015183516107699161137b565b50826060015173ffffffffffffffffffffffffffffffffffffffff168184600001517f525b2e06a8f927c08033ec5d6334d7796bbea62d2d4f0486fe60196d4fe6d0ad866040015187602001516040516107c4929190614a15565b60405180910390a4505050565b6107db8333610ac3565b6107e483611262565b6107ed83610b7f565b6107f6836112d9565b1561085d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b6108678382611482565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060019081015411610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4e6f2070726f706f73616c73206578697374206174207475726e20313a20636160448201527f6e6e6f7420766f7465000000000000000000000000000000000000000000000060648201526084016104fc565b600061093284610c9d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c8201602052604090205490915060ff16156109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f416c726561647920766f7465640000000000000000000000000000000000000060448201526064016104fc565b600181600a0160008282546109dc9190614a02565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600c82016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a3b848361137b565b5060008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015473ffffffffffffffffffffffffffffffffffffffff831690857f70a202954fc6b6d8015f8bcfbc543189e19810d2e7e964e655ab5922d1ac5b4e86604051610ab59190614a2e565b60405180910390a450505050565b610acc82611262565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4f6e6c792067616d65206d61737465720000000000000000000000000000000060448201526064016104fc565b5050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812090829003610bbc57610bbc614a41565b600481015460ff16610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f47616d6520686173206e6f74207965742073746172746564000000000000000060448201526064016104fc565b610c33816112d9565b15610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b50565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090610cd160058201611556565b6060806000610d2286610cd8565b90506000815167ffffffffffffffff811115610d4057610d40614142565b604051908082528060200260200182016040528015610d69578160200160208202803683370190505b5090506000825167ffffffffffffffff811115610d8857610d88614142565b604051908082528060200260200182016040528015610db1578160200160208202803683370190505b5090506000835167ffffffffffffffff811115610dd057610dd0614142565b604051908082528060200260200182016040528015610df9578160200160208202803683370190505b5090506000610e06611563565b90506000610e138b610c9d565b905060005b8651811015610ebd5781600c016000888381518110610e3957610e39614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16848281518110610e9b57610e9b614589565b9115156020928302919091019091015280610eb5816146e6565b915050610e18565b5060068201548951604080516060810182526005860154815260208101849052600786015491810191909152610ef89290918d91879161158c565b935060005b8651811015610fef5786518a8281518110610f1a57610f1a614589565b60200260200101511015610fdd57848181518110610f3a57610f3a614589565b6020026020010151610f6e888381518110610f5757610f57614589565b60200260200101518e61182f90919063ffffffff16565b610f789190614a02565b868281518110610f8a57610f8a614589565b602002602001018181525050610fdd878281518110610fab57610fab614589565b6020026020010151878381518110610fc557610fc5614589565b60200260200101518e6118879092919063ffffffff16565b80610fe7816146e6565b915050610efd565b50939a92995091975050505050505050565b606080600061100f84610cd8565b90506000815167ffffffffffffffff81111561102d5761102d614142565b604051908082528060200260200182016040528015611056578160200160208202803683370190505b50905060005b825181101561110a576110db8684838151811061107b5761107b614589565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b8282815181106110ed576110ed614589565b602090810291909101015280611102816146e6565b91505061105c565b509094909350915050565b600080600061112385611952565b9250925092508280156111335750815b156111645760405185907f16b81a8b7a63ff74301aeb7a5b3048ff92880ec2bb0773136ed953bf4ef6f47390600090a25b82156111965760405185907f355ab9c54569d91a1467b11b130e91c3f6c15c3c50c7225177cfaf66ba44ddd090600090a25b80156112515760006111e96111df7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b8790611b01611b59565b905060006111f687610cd8565b9050816040516112069190614a70565b60405180910390208160405161121c9190614aa6565b6040519081900381209089907f310cab2765035ece7f5c89e2f74e216e41485f0911e38063d06de80c47e14b7e90600090a450505b61125b8585611ceb565b5050505050565b61126a611d73565b61127381611e06565b610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e640000000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156113625750600b81015460ff16155b15611371575060019392505050565b5060009392505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206001015460006113b6611563565b905060006113c386610c9d565b90506001808481036113d457600091505b6007840154600484015410156113e957600091505b6001828015611420575073ffffffffffffffffffffffffffffffffffffffff88166000908152600c8501602052604090205460ff16155b15611429575060005b81801561145b575073ffffffffffffffffffffffffffffffffffffffff88166000908152600585016020526040902054155b15611464575060005b8015611474576114748989611e62565b955050505050505b92915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908314611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b505050565b60606000610cd1836120e7565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261147c565b606060008267ffffffffffffffff8111156115a9576115a9614142565b6040519080825280602002602001820160405280156115d2578160200160208202803683370190505b5090506000865167ffffffffffffffff8111156115f1576115f1614142565b60405190808252806020026020018201604052801561161a578160200160208202803683370190505b50905060005b8481101561182257600083828151811061163c5761163c614589565b60200260200101818152505060005b885181101561180f57600089828151811061166857611668614589565b6020026020010151905088828151811061168457611684614589565b60200260200101516116e157878584815181106116a3576116a3614589565b602002602001018181516116b79190614a02565b9052508a5184518590849081106116d0576116d0614589565b6020026020010181815250506117fc565b8083815181106116f3576116f3614589565b602002602001015185848151811061170d5761170d614589565b602002602001018181516117219190614a02565b905250805160029082908590811061173b5761173b614589565b602002602001015161174d9190614c06565b84838151811061175f5761175f614589565b602002602001018181516117739190614a02565b9052508a51845185908490811061178c5761178c614589565b602002602001015111156117fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f7200000000000000000000000060448201526064016104fc565b5080611807816146e6565b91505061164b565b508061181a816146e6565b915050611620565b5090979650505050505050565b60009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206118be8484612143565b611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f706c61796572206e6f7420696e20612067616d6500000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff9092166000908152600990920160205260409091205550565b6000806000611960846121c2565b6119c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6578745475726e2d3e43616e456e644561726c79000000000000000000000060448201526064016104fc565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206119fc8161224b565b6001816001016000828254611a119190614a02565b90915550504260028201556000611a27866122da565b90508080611a395750600b82015460ff165b15611a7c576000611a4987612361565b600b840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055505b611a85866112d9565b600483018054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055611ac586612452565b508051611adb90600c85019060208401906140a3565b5050600b82015460049092015490945060ff918216935061010090041690509193909250565b6000611b0c83610c9d565b600181015490915061155190849073ffffffffffffffffffffffffffffffffffffffff16611b3982612489565b600081518110611b4b57611b4b614589565b602002602001015185612529565b6060611b6484611262565b611b7684611b7186612489565b61258c565b6000611b8185611001565b9150506000611b8f86610cd8565b905060005b8151811015611bf957611bc087838381518110611bb357611bb3614589565b6020026020010151612630565b611be787838381518110611bd657611bd6614589565b60200260200101518763ffffffff16565b80611bf1816146e6565b915050611b94565b506000611c04611563565b600181015481548451600284015493945073ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb928a9291611c419190614c15565b611c4b9190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdf9190614c2c565b50919695505050505050565b6000611cf683610c9d565b905060005b8251811015611d6d57828181518110611d1657611d16614589565b60200260200101518260020160008381526020019081526020016000209081611d3f91906148e8565b506001826003016000828254611d559190614a02565b90915550819050611d65816146e6565b915050611cfb565b50505050565b6000611d7d611563565b600481015490915074010000000000000000000000000000000000000000900460ff16610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a6564000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff1615611e595750600192915050565b50600092915050565b81611e6c816126f7565b15611ed3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f6e6c79496e5475726e54696d65202d3e207475726e2074696d65646f75740060448201526064016104fc565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020611f0984610b7f565b611f1284610c2a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260078201602052604090205460ff1615611fa4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c7265616479206d6164652061206d6f76650000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908514612073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600783016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600884018054919290916120db908490614a02565b90915550505050505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561213757602002820191906000526020600020905b815481526020019060010190808311612123575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9084146121b75760006121ba565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060006121fd8260050161279a565b82600801541461220e576000612211565b60015b600483015490915060ff16158061222c575061222c846112d9565b1561223b575060009392505050565b80806113625750611362846127a4565b60005b61225a8260050161279a565b8110156122cf5760006122706005840183612818565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550806122c7816146e6565b91505061224e565b506000600890910155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92919003611371575060019392505050565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d818061238f85611001565b915091506123ac816000600184516123a79190614c4e565b612824565b60005b600183516123bd9190614c4e565b8110156124465760058401546123d590600190614c4e565b811161242f57816123e7826001614a02565b815181106123f7576123f7614589565b602002602001015182828151811061241157612411614589565b60200260200101510361242a5750600195945050505050565b612434565b612446565b8061243e816146e6565b9150506123af565b50600095945050505050565b60608060008061246185611001565b9150915061247f828260006001855161247a9190614c4e565b6129a4565b9094909350915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060609190600c810180546040805160208084028201810190925282815293945083018282801561251c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116124f1575b5050505050915050919050565b600061257e8560408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061125b81858585612baf565b600061259783610c9d565b905060006125a3611563565b60048101549091506125ce908590859073ffffffffffffffffffffffffffffffffffffffff16612c5e565b60005b600883015481101561125b5761261e85858560080184815481106125f7576125f7614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612c5e565b80612628816146e6565b9150506125d1565b61263982611262565b6126438282612f1e565b600061264d611563565b9050600061265a84610c9d565b9050600181600001541115611d6d578054600483015461269191859173ffffffffffffffffffffffffffffffffffffffff1661312a565b60005b600882015481101561125b576126e58483600001548460080184815481106126be576126be614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1661312a565b806126ef816146e6565b915050612694565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908360000361275657612756614a41565b600481015460ff16151560011461276f5761276f614a41565b600281015482546127809190614a02565b4211612790575060009392505050565b5060019392505050565b600061147c825490565b6000806127b0836126f7565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806127f957506127f9846112d9565b15612808575060009392505050565b8115611371575060019392505050565b6000610cd183836131b8565b8181808203612834575050505050565b60008560026128438787614c61565b61284d9190614c81565b6128579087614d10565b8151811061286757612867614589565b602002602001015190505b818313612976575b8086848151811061288d5761288d614589565b602002602001015111156128ad57826128a581614d38565b93505061287a565b8582815181106128bf576128bf614589565b60200260200101518111156128e057816128d881614d69565b9250506128ad565b818313612971578582815181106128f9576128f9614589565b602002602001015186848151811061291357612913614589565b602002602001015187858151811061292d5761292d614589565b6020026020010188858151811061294657612946614589565b6020908102919091010191909152528261295f81614d38565b935050818061296d90614d69565b9250505b612872565b8185121561298957612989868684612824565b8383121561299c5761299c868486612824565b505050505050565b81818082036129b4575050611d6d565b60008560026129c38787614c61565b6129cd9190614c81565b6129d79087614d10565b815181106129e7576129e7614589565b602002602001015190505b818313612b7e575b80868481518110612a0d57612a0d614589565b60200260200101511115612a2d5782612a2581614d38565b9350506129fa565b858281518110612a3f57612a3f614589565b6020026020010151811115612a605781612a5881614d69565b925050612a2d565b818313612b7957858281518110612a7957612a79614589565b6020026020010151868481518110612a9357612a93614589565b6020026020010151878581518110612aad57612aad614589565b60200260200101888581518110612ac657612ac6614589565b6020026020010182815250828152505050868281518110612ae957612ae9614589565b6020026020010151878481518110612b0357612b03614589565b6020026020010151888581518110612b1d57612b1d614589565b60200260200101898581518110612b3657612b36614589565b73ffffffffffffffffffffffffffffffffffffffff93841660209182029290920101529116905282612b6781614d38565b9350508180612b7590614d69565b9250505b6129f2565b81851215612b9257612b92878787856129a4565b83831215612ba657612ba6878785876129a4565b50505050505050565b836008015484600701548560060154612bc89190614a02565b10612c2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f2072656c6561736500000060448201526064016104fc565b612c3e843085856000866131e2565b6001846007016000828254612c539190614a02565b909155505050505050565b6000612c6984610c9d565b905060008290508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600081518110612ca057612ca0614589565b602002602001015185600001546001612cb99190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600181518110612d8a57612d8a614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526002606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612e2057600080fd5b505af1158015612e34573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600281518110612e6857612e68614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015612eff57600080fd5b505af1158015612f13573d6000803e3d6000fd5b505050505050505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90612f7684611e06565b612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f742065786973740000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600983016020526040902054841461306c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d65000000000000000000000000000000000060448201526064016104fc565b600481015460ff16158061308f5750600481015460ff6101009091041615156001145b6130f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e636520737461727465640000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561125b6005820184613586565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c6890606401600060405180830381600087803b1580156131a457600080fd5b505af115801561046d573d6000803e3d6000fd5b60008260000182815481106131cf576131cf614589565b9060005260206000200154905092915050565b3073ffffffffffffffffffffffffffffffffffffffff86160361334c5760028601541561325157600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f1935050505015801561324f573d6000803e3d6000fd5b505b6004860154156132a357600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f193505050501580156132a1573d6000803e3d6000fd5b505b6005860154156132f557600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f193505050501580156132f3573d6000803e3d6000fd5b505b60038601541561334757600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613345573d6000803e3d6000fd5b505b6133f0565b6003860154600587015460048801546002890154600093929161336e91614a02565b6133789190614a02565b6133829190614a02565b9050803410156133ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f7700000000000000000000000000000060448201526064016104fc565b505b60005b600a870154811015612ba657600087600a01828154811061341657613416614589565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061345257613452614589565b90600052602060002001549050600089600901848154811061347657613476614589565b60009182526020808320908204015460ff601f9092166101000a90041691508a818360028111156134a9576134a9614dc0565b60028111156134ba576134ba614dc0565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561350957613509614dc0565b036135225761351d84828c8c8c8c8c6135a8565b61356f565b600282600281111561353657613536614dc0565b036135465761351d84828c613720565b600182600281111561355a5761355a614dc0565b0361356f5761356f8484838d8d8d8d8d6138eb565b50505050808061357e906146e6565b9150506133f3565b6000610cd18373ffffffffffffffffffffffffffffffffffffffff8416613cd2565b6135bb8786838960020160010154613dcc565b6135ce8786848960040160010154613dcc565b6135e18786868960060160010154613dcc565b6135f48786858960080160010154613dcc565b600186015487908015801590613620575073ffffffffffffffffffffffffffffffffffffffff87163014155b15612f13576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015613694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b89190614def565b1015612f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e7300000000000000000060448201526064016104fc565b6003820154839015801561373657506005830154155b801561374457506007830154155b801561375257506009830154155b6137b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f72746564000060448201526064016104fc565b6001830154158015906137e1575073ffffffffffffffffffffffffffffffffffffffff82163014155b15611d6d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015613856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061387a9190614def565b600185015490915081101561125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e63650000000000000060448201526064016104fc565b6001860154889080156139ff576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa15801561396d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139919190614def565b9050818110156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c69640000000060448201526064016104fc565b505b5060078701548015613a85578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b8152600401613a52959493929190614e08565b600060405180830381600087803b158015613a6c57600080fd5b505af1158015613a80573d6000803e3d6000fd5b505050505b5060098701548015613b0b578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b8152600401613ad8959493929190614e08565b600060405180830381600087803b158015613af257600080fd5b505af1158015613b06573d6000803e3d6000fd5b505050505b5060058701548015613c405773ffffffffffffffffffffffffffffffffffffffff8416613bc6576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b158015613ba957600080fd5b505af1158015613bbd573d6000803e3d6000fd5b50505050613c40565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b8152600401613c0d959493929190614e08565b600060405180830381600087803b158015613c2757600080fd5b505af1158015613c3b573d6000803e3d6000fd5b505050505b5060038701548015613cc6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b8152600401613c93959493929190614e08565b600060405180830381600087803b158015613cad57600080fd5b505af1158015613cc1573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015613dbb576000613cf6600183614c4e565b8554909150600090613d0a90600190614c4e565b9050818114613d6f576000866000018281548110613d2a57613d2a614589565b9060005260206000200154905080876000018481548110613d4d57613d4d614589565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613d8057613d80614ee9565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061147c565b600091505061147c565b5092915050565b83811561125b573073ffffffffffffffffffffffffffffffffffffffff851603613f315773ffffffffffffffffffffffffffffffffffffffff831615613eac576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190614c2c565b5061125b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015613f1457600080fd5b505af1158015613f28573d6000803e3d6000fd5b5050505061125b565b73ffffffffffffffffffffffffffffffffffffffff831615613fb0576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401613e63565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af115801561402b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061404f9190614c2c565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401612ee5565b82805482825590600052602060002090810192821561411d579160200282015b8281111561411d57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906140c3565b5061412992915061412d565b5090565b5b80821115614129576000815560010161412e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b8576141b8614142565b604052919050565b600067ffffffffffffffff8211156141da576141da614142565b5060051b60200190565b600082601f8301126141f557600080fd5b8135602061420a614205836141c0565b614171565b82815260059290921b8401810191818101908684111561422957600080fd5b8286015b84811015614244578035835291830191830161422d565b509695505050505050565b600082601f83011261426057600080fd5b813567ffffffffffffffff81111561427a5761427a614142565b6142ab60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614171565b8181528460208386010111156142c057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126142ee57600080fd5b813560206142fe614205836141c0565b82815260059290921b8401810191818101908684111561431d57600080fd5b8286015b8481101561424457803567ffffffffffffffff8111156143415760008081fd5b61434f8986838b010161424f565b845250918301918301614321565b6000806000806080858703121561437357600080fd5b8435935060208086013567ffffffffffffffff8082111561439357600080fd5b818801915088601f8301126143a757600080fd5b81356143b5614205826141c0565b81815260059190911b8301840190848101908b8311156143d457600080fd5b8585015b8381101561440c578035858111156143f05760008081fd5b6143fe8e89838a01016141e4565b8452509186019186016143d8565b5097505050604088013592508083111561442557600080fd5b61443189848a016142dd565b9450606088013592508083111561444757600080fd5b5050614455878288016141e4565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff8116811461448557600080fd5b919050565b60006020828403121561449c57600080fd5b813567ffffffffffffffff808211156144b457600080fd5b90830190608082860312156144c857600080fd5b6040516080810181811083821117156144e3576144e3614142565b604052823581526020830135828111156144fc57600080fd5b6145088782860161424f565b6020830152506040830135604082015261452460608401614461565b606082015295945050505050565b60008060006060848603121561454757600080fd5b83359250602084013567ffffffffffffffff81111561456557600080fd5b6145718682870161424f565b92505061458060408501614461565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c908216806145cc57607f821691505b602082108103614605577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60005b8381101561462657818101518382015260200161460e565b50506000910152565b6000825161464181846020870161460b565b9190910192915050565b6000815180845261466381602086016020860161460b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815260006146a8604083018561464b565b90508260208301529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b5060010190565b600081518084526020808501945080840160005b8381101561474e57815187529582019590820190600101614732565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a157828403895261478f84835161464b565b98850198935090840190600101614777565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a15782840389526147e484835161471e565b988501989350908401906001016147cc565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561484557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614813565b50505083810382850152614859818961471e565b915050828103604084015261486e8187614759565b90508281036060840152614882818661471e565b9050828103608084015261489681856147ae565b98975050505050505050565b601f82111561155157600081815260208120601f850160051c810160208610156148c95750805b601f850160051c820191505b8181101561299c578281556001016148d5565b815167ffffffffffffffff81111561490257614902614142565b6149168161491084546145b8565b846148a2565b602080601f83116001811461496957600084156149335750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561299c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156149b657888601518255948401946001909101908401614997565b50858210156149f257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561147c5761147c6146b7565b8281526040602082015260006121ba604083018461464b565b602081526000610cd1602083018461464b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b815160009082906020808601845b83811015614a9a57815185529382019390820190600101614a7e565b50929695505050505050565b815160009082906020808601845b83811015614a9a57815173ffffffffffffffffffffffffffffffffffffffff1685529382019390820190600101614ab4565b600181815b80851115614b3f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b2557614b256146b7565b80851615614b3257918102915b93841c9390800290614aeb565b509250929050565b600082614b565750600161147c565b81614b635750600061147c565b8160018114614b795760028114614b8357614b9f565b600191505061147c565b60ff841115614b9457614b946146b7565b50506001821b61147c565b5060208310610133831016604e8410600b8410161715614bc2575081810a61147c565b614bcc8383614ae6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614bfe57614bfe6146b7565b029392505050565b6000610cd160ff841683614b47565b808202811582820484141761147c5761147c6146b7565b600060208284031215614c3e57600080fd5b81518015158114610cd157600080fd5b8181038181111561147c5761147c6146b7565b8181036000831280158383131683831282161715613dc557613dc56146b7565b600082614cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615614d0b57614d0b6146b7565b500590565b8082018281126000831280158216821582161715614d3057614d306146b7565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b60007f80000000000000000000000000000000000000000000000000000000000000008203614d9a57614d9a6146b7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215614e0157600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a06080850152600091508454614e4f816145b8565b8060a087015260c0600180841660008114614e715760018114614ea957614ed7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650614ed7565b896000528560002060005b85811015614ecf5781548b8201860152908301908701614eb4565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f0115792916c9ff2ad70ba954d7e3b99a4342e7e6981951acfdcf7a491f5db5d64736f6c63430008140033", + "numDeployments": 1, + "solcInputHash": "950621027b9d5cffdabde867c6602559", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"uint256[]\",\"name\":\"scores\",\"type\":\"uint256[]\"}],\"name\":\"GameOver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"LastTurn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"OverTime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"proposalHash\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"proposal\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"score\",\"type\":\"uint256\"}],\"name\":\"ProposalScore\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"commitmentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"proposalEncryptedByGM\",\"type\":\"string\"}],\"name\":\"ProposalSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"scores\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"newProposals\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"proposerIndicies\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[][]\",\"name\":\"votes\",\"type\":\"uint256[][]\"}],\"name\":\"TurnEnded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"turn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"votesHidden\",\"type\":\"string\"}],\"name\":\"VoteSubmitted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[][]\",\"name\":\"votes\",\"type\":\"uint256[][]\"},{\"internalType\":\"string[]\",\"name\":\"newProposals\",\"type\":\"string[]\"},{\"internalType\":\"uint256[]\",\"name\":\"proposerIndicies\",\"type\":\"uint256[]\"}],\"name\":\"endTurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"encryptedProposal\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"commitmentHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"}],\"internalType\":\"struct RankifyInstanceGameMastersFacet.ProposalParams\",\"name\":\"proposalData\",\"type\":\"tuple\"}],\"name\":\"submitProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"encryptedVotes\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"submitVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"endTurn(uint256,uint256[][],string[],uint256[])\":{\"details\":\"Ends the current turn of a game with the provided game ID. `gameId` is the ID of the game. `votes` is the array of votes. `newProposals` is the array of new proposals for the upcoming voting round. `proposerIndicies` is the array of indices of the proposers in the previous voting round. emits a _ProposalScore_ event for each player if the turn is not the first. emits a _TurnEnded_ event. Modifies: - Calls the `_nextTurn` function with `gameId` and `newProposals`. - Resets the number of commitments of the game with `gameId` to 0. - Resets the proposal commitment hash and ongoing proposal of each player in the game with `gameId`. Requirements: - The caller must be a game master of the game with `gameId`. - The game with `gameId` must have started. - The game with `gameId` must not be over. - newProposals array MUST be sorted randomly to ensure privacy votes and proposerIndicies MUST correspond to players array from game.getPlayers()\"},\"submitProposal((uint256,string,bytes32,address))\":{\"details\":\"Submits a proposal for a game. `proposalData` is the proposal data. Requirements: - The game with `proposalData.gameId` must exist. - The caller must be a game master of the game with `proposalData.gameId`.\"},\"submitVote(uint256,string,address)\":{\"details\":\"Submits a vote for a game. `gameId` is the ID of the game. `encryptedVotes` is the encrypted votes. `voter` is the address of the voter. Emits a _VoteSubmitted_ event. Requirements: - The caller must be a game master of the game with `gameId`. - The game with `gameId` must exist. - The game with `gameId` must have started. - The game with `gameId` must not be over. - `voter` must be in the game with `gameId`. - The current turn of the game with `gameId` must be greater than 1.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceGameMastersFacet.sol\":\"RankifyInstanceGameMastersFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../../interfaces/IERC1271.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureChecker {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\\n return\\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x3af3ca86df39aac39a0514c84459d691434a108d2151c8ce9d69f32e315cab80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/CompositeERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"./LockableERC1155.sol\\\";\\n\\n/**\\n * @title CompositeERC1155\\n * @dev An abstract contract that extends LockableERC1155 and provides functionality for composite ERC1155 tokens.\\n * Composite tokens can be \\\"composed\\\" from multiple underlying assets, which however do not change their owner\\n * and in contrast to that use LockableERC1155 standard, which allows to read locked asset BalanceOf, OwnerOf methods correctly\\n */\\nabstract contract CompositeERC1155 is LockableERC1155 {\\n address[] private dimensions;\\n uint256[] private weights;\\n\\n constructor(string memory uri_, address[] memory dimensionTokens, uint256[] memory tokenWeights) ERC1155(uri_) {\\n require(dimensionTokens.length == tokenWeights.length, \\\"Array lengths must be equal\\\");\\n dimensions = dimensionTokens;\\n weights = tokenWeights;\\n }\\n\\n function _mint(address to, uint256 tokenId, uint256 value, bytes memory data) internal virtual override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).lock(to, tokenId, value * weights[i]);\\n }\\n super._mint(to, tokenId, value, data);\\n }\\n\\n function _burn(address from, uint256 id, uint256 amount) internal override {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n CompositeERC1155(dimensions[i]).burn(from, id, amount * weights[i]);\\n }\\n super._burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Decomposes a composite ERC1155 token into its individual components.\\n * This function unlocks the specified amount of the composite token from each dimension,\\n * and then burns the specified amount of the composite token from the caller's balance.\\n * @param from The address from which the composite token is being decomposed.\\n * @param id The ID of the composite token being decomposed.\\n * @param amount The amount of the composite token to decompose.\\n */\\n function decompose(address from, uint256 id, uint256 amount) public virtual {\\n for (uint256 i = 0; i < dimensions.length; i++) {\\n LockableERC1155(dimensions[i]).unlock(from, id, amount * weights[i]);\\n }\\n _burn(from, id, amount);\\n }\\n\\n /**\\n * @dev Burns a specified amount of tokens from the given account.\\n * This will burn all underlying (composite) assets\\n *\\n * Requirements:\\n * - `account` must be the token owner or an approved operator.\\n * - `id` and `value` must be valid token ID and amount to burn.\\n * - All underlying \\\"composite\\\" assets implement burn as well\\n *\\n * @param account The address of the token owner.\\n * @param id The ID of the token to burn.\\n * @param value The amount of tokens to burn.\\n */\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n /**\\n * @dev Retrieves the components of the CompositeERC1155 contract.\\n * @return An array of component addresses and an array of component weights.\\n */\\n function getComponents() public virtual returns (address[] memory, uint256[] memory) {\\n return (dimensions, weights);\\n }\\n}\\n\",\"keccak256\":\"0xad12acae82dd98d6d4375c7c4290667341cb43faa73c6381d9d20094b77fc29e\",\"license\":\"Apache-2.0\"},\"src/abstracts/DiamondReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/**\\n * Author: @Peersky https://github.com/peersky\\n * Adapted this diamond reentrancy guard from:\\n\\n * Authors: Moonstream Engineering (engineering@moonstream.to)\\n * GitHub: https://github.com/bugout-dev/dao\\n */\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\n\\nabstract contract DiamondReentrancyGuard {\\n modifier nonReentrant() {\\n LibReentrancyGuard.ReentrancyGuardStruct storage rgs = LibReentrancyGuard.reentrancyGuardStorage();\\n require(!rgs._entered, \\\"REG: You shall not pass!\\\");\\n rgs._entered = true;\\n _;\\n rgs._entered = false;\\n }\\n}\\n\",\"keccak256\":\"0xfe1f8e71dc63f898ba9ae59193b975352955e0f8c1a694a78cab07df3389cd91\",\"license\":\"Apache-2.0\"},\"src/abstracts/LockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport {ILockableERC1155} from \\\"../interfaces/ILockableERC1155.sol\\\";\\nerror insufficient(uint256 id, uint256 balance, uint256 required);\\n\\n/**\\n * @title LockableERC1155\\n * @dev This is an abstract contract that extends the ERC1155 token contract and implements the ILockableERC1155 interface.\\n * It provides functionality to lock and unlock token amounts for specific accounts and IDs.\\n */\\nabstract contract LockableERC1155 is ERC1155, ILockableERC1155 {\\n mapping(address => mapping(uint256 => uint256)) lockedAmounts;\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID.\\n * If the account does not have enough balance to lock the specified amount,\\n * the function will revert with an \\\"insufficient\\\" error message.\\n * Emits a `TokensLocked` event after successfully locking the tokens.\\n * @param account The address of the account to lock tokens for.\\n * @param id The ID of the token to lock.\\n * @param amount The amount of tokens to lock.\\n */\\n function lock(address account, uint256 id, uint256 amount) public virtual {\\n if (balanceOf(account, id) < lockedAmounts[account][id] + amount) require(false, \\\"insufficient\\\");\\n // revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] += amount;\\n emit TokensLocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID.\\n * If the locked amount is less than the specified amount, it reverts with an \\\"insufficient\\\" error message.\\n * Emits a `TokensUnlocked` event after unlocking the tokens.\\n * @param account The address of the account to unlock tokens for.\\n * @param id The ID of the token to unlock.\\n * @param amount The amount of tokens to unlock.\\n */\\n function unlock(address account, uint256 id, uint256 amount) public virtual {\\n if (lockedAmounts[account][id] < amount) require(false, \\\"insufficient\\\"); //revert insufficient(id, lockedAmounts[account][id], amount);\\n lockedAmounts[account][id] -= amount;\\n emit TokensUnlocked(account, id, amount);\\n }\\n\\n /**\\n * @dev Returns the unlocked balance of a specific ERC1155 token for an account.\\n * The unlocked balance is calculated by subtracting the locked amount from the total balance.\\n * @param account The address of the account.\\n * @param id The ID of the ERC1155 token.\\n * @return The unlocked balance of the ERC1155 token for the account.\\n */\\n function unlockedBalanceOf(address account, uint256 id) public view returns (uint256) {\\n return balanceOf(account, id) - lockedAmounts[account][id];\\n }\\n\\n /**\\n * @dev Hook function that is called before any token transfer.\\n * It checks if the transfer is allowed based on the locked amounts of the tokens.\\n * If the transfer is not allowed, it reverts with an error message.\\n * @param operator The address performing the token transfer.\\n * @param from The address from which the tokens are being transferred.\\n * @param to The address to which the tokens are being transferred.\\n * @param ids An array of token IDs being transferred.\\n * @param amounts An array of token amounts being transferred.\\n * @param data Additional data attached to the transfer.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (from != address(0)) {\\n if (lockedAmounts[from][ids[i]] + amounts[i] > balanceOf(from, ids[i])) {\\n require(false, \\\"insufficient\\\");\\n }\\n }\\n }\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x68f61e7bf0aa1edf0c1fbe58004a67856521d882c272542e81b48ebe5a16caca\",\"license\":\"Apache-2.0\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceGameMastersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport \\\"../abstracts/DiamondReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\nimport {RankToken} from \\\"../tokens/RankToken.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\ncontract RankifyInstanceGameMastersFacet is DiamondReentrancyGuard, EIP712 {\\n using LibTBG for uint256;\\n using LibRankify for uint256;\\n using LibTBG for LibTBG.GameInstance;\\n event OverTime(uint256 indexed gameId);\\n event LastTurn(uint256 indexed gameId);\\n event ProposalScore(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n string indexed proposalHash,\\n string proposal,\\n uint256 score\\n );\\n event TurnEnded(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n address[] players,\\n uint256[] scores,\\n string[] newProposals,\\n uint256[] proposerIndicies,\\n uint256[][] votes\\n );\\n\\n event GameOver(uint256 indexed gameId, address[] indexed players, uint256[] indexed scores);\\n\\n event ProposalSubmitted(\\n uint256 indexed gameId,\\n uint256 indexed turn,\\n address indexed proposer,\\n bytes32 commitmentHash,\\n string proposalEncryptedByGM\\n );\\n struct ProposalParams {\\n uint256 gameId;\\n string encryptedProposal;\\n bytes32 commitmentHash;\\n address proposer;\\n }\\n\\n event VoteSubmitted(uint256 indexed gameId, uint256 indexed turn, address indexed player, string votesHidden);\\n\\n /**\\n * @dev Handles the end of the game for a player. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Releases the coins for the game with `gameId`, the game creator, the top player, and `player`.\\n */\\n function onPlayersGameEnd(uint256 gameId, address player) private {\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n LibCoinVending.release(bytes32(gameId), game.createdBy, gameId.getLeaderBoard()[0], player);\\n }\\n\\n /**\\n * @dev Submits a vote for a game. `gameId` is the ID of the game. `encryptedVotes` is the encrypted votes. `voter` is the address of the voter.\\n *\\n * Emits a _VoteSubmitted_ event.\\n *\\n * Requirements:\\n *\\n * - The caller must be a game master of the game with `gameId`.\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `voter` must be in the game with `gameId`.\\n * - The current turn of the game with `gameId` must be greater than 1.\\n */\\n function submitVote(uint256 gameId, string memory encryptedVotes, address voter) public {\\n LibRankify.enforceIsGM(gameId, msg.sender);\\n gameId.enforceGameExists();\\n gameId.enforceHasStarted();\\n require(!gameId.isGameOver(), \\\"Game over\\\");\\n gameId.enforceIsPlayingGame(voter);\\n require(gameId.getTurn() > 1, \\\"No proposals exist at turn 1: cannot vote\\\");\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n require(!game.playerVoted[voter], \\\"Already voted\\\");\\n game.numVotesThisTurn += 1;\\n game.playerVoted[voter] = true;\\n gameId.tryPlayerMove(voter);\\n emit VoteSubmitted(gameId, gameId.getTurn(), voter, encryptedVotes);\\n }\\n\\n /**\\n * @dev Submits a proposal for a game. `proposalData` is the proposal data.\\n *\\n * Requirements:\\n *\\n * - The game with `proposalData.gameId` must exist.\\n * - The caller must be a game master of the game with `proposalData.gameId`.\\n */\\n function submitProposal(ProposalParams memory proposalData) public {\\n proposalData.gameId.enforceGameExists();\\n proposalData.gameId.enforceIsGM(msg.sender);\\n require(!proposalData.gameId.isGameOver(), \\\"Game over\\\");\\n proposalData.gameId.enforceHasStarted();\\n\\n IRankifyInstanceCommons.RInstance storage game = proposalData.gameId.getGameStorage();\\n require(LibTBG.getPlayersGame(proposalData.proposer) == proposalData.gameId, \\\"not a player\\\");\\n // require(!proposalData.gameId.isLastTurn(), \\\"Cannot propose in last turn\\\");\\n require(bytes(proposalData.encryptedProposal).length != 0, \\\"Cannot propose empty\\\");\\n require(game.proposalCommitmentHashes[proposalData.proposer] == \\\"\\\", \\\"Already proposed!\\\");\\n uint256 turn = proposalData.gameId.getTurn();\\n game.proposalCommitmentHashes[proposalData.proposer] = proposalData.commitmentHash;\\n game.numCommitments += 1;\\n proposalData.gameId.tryPlayerMove(proposalData.proposer);\\n emit ProposalSubmitted(\\n proposalData.gameId,\\n turn,\\n proposalData.proposer,\\n proposalData.commitmentHash,\\n proposalData.encryptedProposal\\n );\\n }\\n\\n /**\\n * @dev Handles the actions after the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\\n *\\n * Modifies:\\n *\\n * - Sets the ongoing proposals of the game with `gameId` to `newProposals`.\\n * - Increments the number of ongoing proposals of the game with `gameId` by the number of `newProposals`.\\n */\\n function _afterNextTurn(uint256 gameId, string[] memory newProposals) private {\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n for (uint256 i = 0; i < newProposals.length; i++) {\\n game.ongoingProposals[i] = newProposals[i];\\n game.numOngoingProposals += 1;\\n }\\n }\\n\\n /**\\n * @dev Handles the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\\n *\\n * Emits an {OverTime_ event if the game is in the last turn and overtime.\\n * emits a _LastTurn_ event if the game is in the last turn.\\n * emits a _GameOver_ event if the game is over.\\n *\\n * Modifies:\\n *\\n * - Calls the `_afterNextTurn` function with `gameId` and `newProposals`.\\n */\\n function _nextTurn(uint256 gameId, string[] memory newProposals) private {\\n (bool _isLastTurn, bool _isOvertime, bool _isGameOver) = gameId.nextTurn();\\n if (_isLastTurn && _isOvertime) {\\n emit OverTime(gameId);\\n }\\n if (_isLastTurn) {\\n emit LastTurn(gameId);\\n }\\n if (_isGameOver) {\\n uint256[] memory finalScores = gameId.closeGame(LibDiamond.contractOwner(), onPlayersGameEnd);\\n address[] memory players = gameId.getPlayers();\\n emit GameOver(gameId, players, finalScores);\\n }\\n _afterNextTurn(gameId, newProposals);\\n }\\n\\n /**\\n * @dev Ends the current turn of a game with the provided game ID. `gameId` is the ID of the game. `votes` is the array of votes. `newProposals` is the array of new proposals for the upcoming voting round. `proposerIndicies` is the array of indices of the proposers in the previous voting round.\\n *\\n * emits a _ProposalScore_ event for each player if the turn is not the first.\\n * emits a _TurnEnded_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `_nextTurn` function with `gameId` and `newProposals`.\\n * - Resets the number of commitments of the game with `gameId` to 0.\\n * - Resets the proposal commitment hash and ongoing proposal of each player in the game with `gameId`.\\n *\\n * Requirements:\\n *\\n * - The caller must be a game master of the game with `gameId`.\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - newProposals array MUST be sorted randomly to ensure privacy\\n * votes and proposerIndicies MUST correspond to players array from game.getPlayers()\\n */\\n function endTurn(\\n uint256 gameId,\\n uint256[][] memory votes,\\n string[] memory newProposals, //REFERRING TO UPCOMING VOTING ROUND\\n uint256[] memory proposerIndicies //REFERRING TO game.players index in PREVIOUS VOTING ROUND\\n ) public {\\n gameId.enforceIsGM(msg.sender);\\n gameId.enforceHasStarted();\\n gameId.enforceIsNotOver();\\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\\n uint256 turn = gameId.getTurn();\\n\\n address[] memory players = gameId.getPlayers();\\n if (turn != 1) {\\n (, uint256[] memory roundScores) = gameId.calculateScoresQuadratic(votes, proposerIndicies);\\n for (uint256 i = 0; i < players.length; i++) {\\n string memory proposal = game.ongoingProposals[proposerIndicies[i]];\\n emit ProposalScore(gameId, turn, proposal, proposal, roundScores[i]);\\n }\\n }\\n (, uint256[] memory scores) = gameId.getScores();\\n emit TurnEnded(gameId, gameId.getTurn(), players, scores, newProposals, proposerIndicies, votes);\\n\\n // Clean up game instance for upcoming round\\n\\n game.numCommitments = 0;\\n for (uint256 i = 0; i < players.length; i++) {\\n game.proposalCommitmentHashes[players[i]] = bytes32(0);\\n game.ongoingProposals[i] = \\\"\\\";\\n game.playerVoted[players[i]] = false;\\n game.votesHidden[players[i]].hash = bytes32(0);\\n }\\n // This data is to needed to correctly detetermine \\\"PlayerMove\\\" conditions during next turn\\n game.numVotesPrevTurn = game.numVotesThisTurn;\\n game.numVotesThisTurn = 0;\\n game.numPrevProposals = game.numOngoingProposals;\\n game.numOngoingProposals = 0;\\n\\n _nextTurn(gameId, newProposals);\\n }\\n}\\n\",\"keccak256\":\"0xb589e87986d2a935bae11c1c6720d7c9555bb50e2c707f5ee8737263a4ce6550\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef038fdedc9d4857f9f190562c07849c9813fd4ae927a4e81cef94a29a3f5ed\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x9e5c01321d4e1f9102bd4638b5fc168a3aecae7d04de267838ca04848bebd81a\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/tokens/RankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/CompositeERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\npragma solidity ^0.8.20;\\n\\ncontract RankToken is CompositeERC1155, Ownable, IRankToken {\\n string private _contractURI;\\n mapping(address => uint256) public rank;\\n uint256 public topRank;\\n address private _rankingInstance;\\n uint256 _levelUpThreshold;\\n\\n modifier onlyRankingInstance() {\\n require(msg.sender == _rankingInstance, \\\"only ranking contract can do that\\\");\\n _;\\n }\\n\\n constructor(\\n string memory uri_,\\n address owner_,\\n string memory cURI,\\n uint256 levelUpThreshold,\\n address[] memory components,\\n uint256[] memory componentWeights\\n ) CompositeERC1155(uri_, components, componentWeights) {\\n require(owner_ != address(0), \\\"must specify owner of the contract\\\");\\n _contractURI = cURI;\\n _levelUpThreshold = levelUpThreshold;\\n transferOwnership(owner_);\\n }\\n\\n function getRankingInstance() public view returns (address) {\\n return _rankingInstance;\\n }\\n\\n function contractURI() public view returns (string memory) {\\n return _contractURI;\\n }\\n\\n function setURI(string memory uri_) public onlyOwner {\\n _setURI(uri_);\\n }\\n\\n function setContractURI(string memory uri_) public onlyOwner {\\n _contractURI = uri_;\\n }\\n\\n event Leader(address indexed account, uint256 indexed rank);\\n\\n function _mintRank(address to, uint256 amount, uint256 level, bytes memory data) private {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amount != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(level != 0, \\\"RankToken->mint: pool id not specified\\\");\\n if (level > topRank) {\\n topRank = level;\\n emit Leader(to, level);\\n }\\n _mint(to, level, amount, data);\\n }\\n\\n function mint(address to, uint256 amount, uint256 level, bytes memory data) public onlyRankingInstance {\\n _mintRank(to, amount, level, data);\\n }\\n\\n function updateRankingInstance(address newRankingInstance) public onlyOwner {\\n require(newRankingInstance != address(0), \\\"must specify ranking instance\\\");\\n _rankingInstance = newRankingInstance;\\n emit RankingInstanceUpdated(newRankingInstance);\\n }\\n\\n function lock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.lock(account, id, amount);\\n }\\n\\n function unlock(\\n address account,\\n uint256 id,\\n uint256 amount\\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\\n super.unlock(account, id, amount);\\n }\\n\\n function batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public onlyRankingInstance {\\n require(to != address(0), \\\"RankToken->mint: Address not specified\\\");\\n require(amounts.length != 0, \\\"RankToken->mint: amount not specified\\\");\\n require(ids.length != 0, \\\"RankToken->mint: pool id not specified\\\");\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function levelUp(address to, uint256 level, bytes memory data) public {\\n require(to == msg.sender || msg.sender == _rankingInstance, \\\"levelUp: Not permitted\\\");\\n _burn(to, level, _levelUpThreshold);\\n _mintRank(to, 1, level, data);\\n emit LevelUp(to, level);\\n }\\n\\n function findNewRank(address account, uint256 oldRank) public view returns (uint256) {\\n for (uint256 i = oldRank; i > 0; i--) {\\n uint256 _balanceTemp = balanceOf(account, i);\\n if (_balanceTemp > 0) return i;\\n }\\n return 0;\\n }\\n\\n event RankUpdated(address indexed account, uint256 indexed rank);\\n\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal override {\\n for (uint256 i = 0; i < ids.length; i++) {\\n if (rank[to] < ids[i] && amounts[i] != 0) {\\n rank[to] = ids[i];\\n emit RankUpdated(to, ids[i]);\\n }\\n if (from != address(0) && (rank[from] != findNewRank(from, rank[from]))) {\\n uint256 newRankFrom = findNewRank(from, rank[from]);\\n rank[from] = newRankFrom;\\n emit RankUpdated(from, newRankFrom);\\n }\\n\\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n }\\n\\n //ToDo: Rename in to rankOf(address account)\\n function getAccountRank(address account) external view returns (uint256) {\\n return rank[account];\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC1155) returns (bool) {\\n return interfaceId == type(IRankToken).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x2a333824a5509334058ab6ac8d92fb32a04436f9e15aca1ea1de60647996f7f5\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50614f4e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630c6446d514610046578063463bc3551461005b5780636a9947351461006e575b600080fd5b61005961005436600461435d565b610081565b005b61005961006936600461448a565b610477565b61005961007c366004614532565b6107d1565b61008b8433610ac3565b61009484610b7f565b61009d84610c2a565b60006100a885610c9d565b60008681527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101549192506100e587610cd8565b9050816001146102465760006100fc888887610d14565b91505060005b825181101561024357600085600201600088848151811061012557610125614589565b602002602001015181526020019081526020016000208054610146906145b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610172906145b8565b80156101bf5780601f10610194576101008083540402835291602001916101bf565b820191906000526020600020905b8154815290600101906020018083116101a257829003601f168201915b50505050509050806040516101d4919061462f565b6040518091039020858b7f71cc117353a39d910a72175a56496eefb857568810a5f5b11079400201be4dd48487878151811061021257610212614589565b6020026020010151604051610228929190614695565b60405180910390a4508061023b816146e6565b915050610102565b50505b600061025188611001565b91505061028c8860009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015490565b887f69a9400160c8f6e71eb8c0ab9c5824e20304af8146719a7625c9d15675ebb6d384848a8a8d6040516102c49594939291906147f6565b60405180910390a36000600685018190555b8251811015610445576000801b8560050160008584815181106102fb576102fb614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060405180602001604052806000815250856002016000838152602001908152602001600020908161037291906148e8565b50600085600c01600085848151811061038d5761038d614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000801b85600701600085848151811061040257610402614589565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020558061043d816146e6565b9150506102d6565b50600a84018054600b86015560009081905560038501805460048701555561046d8887611115565b5050505050505050565b805161048290611262565b805161048e9033610ac3565b8051610499906112d9565b15610505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b805161051090610b7f565b600061051f8260000151610c9d565b8251606084015173ffffffffffffffffffffffffffffffffffffffff1660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f366020526040902054919250146105d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206120706c61796572000000000000000000000000000000000000000060448201526064016104fc565b816020015151600003610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f742070726f706f736520656d70747900000000000000000000000060448201526064016104fc565b606082015173ffffffffffffffffffffffffffffffffffffffff166000908152600582016020526040902054156106d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f416c72656164792070726f706f7365642100000000000000000000000000000060448201526064016104fc565b815160009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060010154604080850151606086015173ffffffffffffffffffffffffffffffffffffffff1660009081526005860160205291822055600684018054929350600192909190610754908490614a02565b9091555050606083015183516107699161137b565b50826060015173ffffffffffffffffffffffffffffffffffffffff168184600001517f525b2e06a8f927c08033ec5d6334d7796bbea62d2d4f0486fe60196d4fe6d0ad866040015187602001516040516107c4929190614a15565b60405180910390a4505050565b6107db8333610ac3565b6107e483611262565b6107ed83610b7f565b6107f6836112d9565b1561085d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b6108678382611482565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060019081015411610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4e6f2070726f706f73616c73206578697374206174207475726e20313a20636160448201527f6e6e6f7420766f7465000000000000000000000000000000000000000000000060648201526084016104fc565b600061093284610c9d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c8201602052604090205490915060ff16156109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f416c726561647920766f7465640000000000000000000000000000000000000060448201526064016104fc565b600181600a0160008282546109dc9190614a02565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600c82016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a3b848361137b565b5060008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015473ffffffffffffffffffffffffffffffffffffffff831690857f70a202954fc6b6d8015f8bcfbc543189e19810d2e7e964e655ab5922d1ac5b4e86604051610ab59190614a2e565b60405180910390a450505050565b610acc82611262565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4f6e6c792067616d65206d61737465720000000000000000000000000000000060448201526064016104fc565b5050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812090829003610bbc57610bbc614a41565b600481015460ff16610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f47616d6520686173206e6f74207965742073746172746564000000000000000060448201526064016104fc565b610c33816112d9565b15610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b50565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090610cd160058201611556565b6060806000610d2286610cd8565b90506000815167ffffffffffffffff811115610d4057610d40614142565b604051908082528060200260200182016040528015610d69578160200160208202803683370190505b5090506000825167ffffffffffffffff811115610d8857610d88614142565b604051908082528060200260200182016040528015610db1578160200160208202803683370190505b5090506000835167ffffffffffffffff811115610dd057610dd0614142565b604051908082528060200260200182016040528015610df9578160200160208202803683370190505b5090506000610e06611563565b90506000610e138b610c9d565b905060005b8651811015610ebd5781600c016000888381518110610e3957610e39614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16848281518110610e9b57610e9b614589565b9115156020928302919091019091015280610eb5816146e6565b915050610e18565b5060068201548951604080516060810182526005860154815260208101849052600786015491810191909152610ef89290918d91879161158c565b935060005b8651811015610fef5786518a8281518110610f1a57610f1a614589565b60200260200101511015610fdd57848181518110610f3a57610f3a614589565b6020026020010151610f6e888381518110610f5757610f57614589565b60200260200101518e61182f90919063ffffffff16565b610f789190614a02565b868281518110610f8a57610f8a614589565b602002602001018181525050610fdd878281518110610fab57610fab614589565b6020026020010151878381518110610fc557610fc5614589565b60200260200101518e6118879092919063ffffffff16565b80610fe7816146e6565b915050610efd565b50939a92995091975050505050505050565b606080600061100f84610cd8565b90506000815167ffffffffffffffff81111561102d5761102d614142565b604051908082528060200260200182016040528015611056578160200160208202803683370190505b50905060005b825181101561110a576110db8684838151811061107b5761107b614589565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b8282815181106110ed576110ed614589565b602090810291909101015280611102816146e6565b91505061105c565b509094909350915050565b600080600061112385611952565b9250925092508280156111335750815b156111645760405185907f16b81a8b7a63ff74301aeb7a5b3048ff92880ec2bb0773136ed953bf4ef6f47390600090a25b82156111965760405185907f355ab9c54569d91a1467b11b130e91c3f6c15c3c50c7225177cfaf66ba44ddd090600090a25b80156112515760006111e96111df7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b8790611b01611b59565b905060006111f687610cd8565b9050816040516112069190614a70565b60405180910390208160405161121c9190614aa6565b6040519081900381209089907f310cab2765035ece7f5c89e2f74e216e41485f0911e38063d06de80c47e14b7e90600090a450505b61125b8585611ceb565b5050505050565b61126a611d73565b61127381611e06565b610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e640000000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156113625750600b81015460ff16155b15611371575060019392505050565b5060009392505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206001015460006113b6611563565b905060006113c386610c9d565b90506001808481036113d457600091505b6007840154600484015410156113e957600091505b6001828015611420575073ffffffffffffffffffffffffffffffffffffffff88166000908152600c8501602052604090205460ff16155b15611429575060005b81801561145b575073ffffffffffffffffffffffffffffffffffffffff88166000908152600585016020526040902054155b15611464575060005b8015611474576114748989611e62565b955050505050505b92915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908314611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b505050565b60606000610cd1836120e7565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261147c565b606060008267ffffffffffffffff8111156115a9576115a9614142565b6040519080825280602002602001820160405280156115d2578160200160208202803683370190505b5090506000865167ffffffffffffffff8111156115f1576115f1614142565b60405190808252806020026020018201604052801561161a578160200160208202803683370190505b50905060005b8481101561182257600083828151811061163c5761163c614589565b60200260200101818152505060005b885181101561180f57600089828151811061166857611668614589565b6020026020010151905088828151811061168457611684614589565b60200260200101516116e157878584815181106116a3576116a3614589565b602002602001018181516116b79190614a02565b9052508a5184518590849081106116d0576116d0614589565b6020026020010181815250506117fc565b8083815181106116f3576116f3614589565b602002602001015185848151811061170d5761170d614589565b602002602001018181516117219190614a02565b905250805160029082908590811061173b5761173b614589565b602002602001015161174d9190614c06565b84838151811061175f5761175f614589565b602002602001018181516117739190614a02565b9052508a51845185908490811061178c5761178c614589565b602002602001015111156117fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f7200000000000000000000000060448201526064016104fc565b5080611807816146e6565b91505061164b565b508061181a816146e6565b915050611620565b5090979650505050505050565b60009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206118be8484612143565b611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f706c61796572206e6f7420696e20612067616d6500000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff9092166000908152600990920160205260409091205550565b6000806000611960846121c2565b6119c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6578745475726e2d3e43616e456e644561726c79000000000000000000000060448201526064016104fc565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206119fc8161224b565b6001816001016000828254611a119190614a02565b90915550504260028201556000611a27866122da565b90508080611a395750600b82015460ff165b15611a7c576000611a4987612361565b600b840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055505b611a85866112d9565b600483018054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055611ac586612452565b508051611adb90600c85019060208401906140a3565b5050600b82015460049092015490945060ff918216935061010090041690509193909250565b6000611b0c83610c9d565b600181015490915061155190849073ffffffffffffffffffffffffffffffffffffffff16611b3982612489565b600081518110611b4b57611b4b614589565b602002602001015185612529565b6060611b6484611262565b611b7684611b7186612489565b61258c565b6000611b8185611001565b9150506000611b8f86610cd8565b905060005b8151811015611bf957611bc087838381518110611bb357611bb3614589565b6020026020010151612630565b611be787838381518110611bd657611bd6614589565b60200260200101518763ffffffff16565b80611bf1816146e6565b915050611b94565b506000611c04611563565b600181015481548451600284015493945073ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb928a9291611c419190614c15565b611c4b9190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdf9190614c2c565b50919695505050505050565b6000611cf683610c9d565b905060005b8251811015611d6d57828181518110611d1657611d16614589565b60200260200101518260020160008381526020019081526020016000209081611d3f91906148e8565b506001826003016000828254611d559190614a02565b90915550819050611d65816146e6565b915050611cfb565b50505050565b6000611d7d611563565b600481015490915074010000000000000000000000000000000000000000900460ff16610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a6564000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff1615611e595750600192915050565b50600092915050565b81611e6c816126f7565b15611ed3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f6e6c79496e5475726e54696d65202d3e207475726e2074696d65646f75740060448201526064016104fc565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020611f0984610b7f565b611f1284610c2a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260078201602052604090205460ff1615611fa4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c7265616479206d6164652061206d6f76650000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908514612073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600783016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600884018054919290916120db908490614a02565b90915550505050505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561213757602002820191906000526020600020905b815481526020019060010190808311612123575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9084146121b75760006121ba565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060006121fd8260050161279a565b82600801541461220e576000612211565b60015b600483015490915060ff16158061222c575061222c846112d9565b1561223b575060009392505050565b80806113625750611362846127a4565b60005b61225a8260050161279a565b8110156122cf5760006122706005840183612818565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550806122c7816146e6565b91505061224e565b506000600890910155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92919003611371575060019392505050565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d818061238f85611001565b915091506123ac816000600184516123a79190614c4e565b612824565b60005b600183516123bd9190614c4e565b8110156124465760058401546123d590600190614c4e565b811161242f57816123e7826001614a02565b815181106123f7576123f7614589565b602002602001015182828151811061241157612411614589565b60200260200101510361242a5750600195945050505050565b612434565b612446565b8061243e816146e6565b9150506123af565b50600095945050505050565b60608060008061246185611001565b9150915061247f828260006001855161247a9190614c4e565b6129a4565b9094909350915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060609190600c810180546040805160208084028201810190925282815293945083018282801561251c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116124f1575b5050505050915050919050565b600061257e8560408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061125b81858585612baf565b600061259783610c9d565b905060006125a3611563565b60048101549091506125ce908590859073ffffffffffffffffffffffffffffffffffffffff16612c5e565b60005b600883015481101561125b5761261e85858560080184815481106125f7576125f7614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612c5e565b80612628816146e6565b9150506125d1565b61263982611262565b6126438282612f1e565b600061264d611563565b9050600061265a84610c9d565b9050600181600001541115611d6d578054600483015461269191859173ffffffffffffffffffffffffffffffffffffffff1661312a565b60005b600882015481101561125b576126e58483600001548460080184815481106126be576126be614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1661312a565b806126ef816146e6565b915050612694565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908360000361275657612756614a41565b600481015460ff16151560011461276f5761276f614a41565b600281015482546127809190614a02565b4211612790575060009392505050565b5060019392505050565b600061147c825490565b6000806127b0836126f7565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806127f957506127f9846112d9565b15612808575060009392505050565b8115611371575060019392505050565b6000610cd183836131b8565b8181808203612834575050505050565b60008560026128438787614c61565b61284d9190614c81565b6128579087614d10565b8151811061286757612867614589565b602002602001015190505b818313612976575b8086848151811061288d5761288d614589565b602002602001015111156128ad57826128a581614d38565b93505061287a565b8582815181106128bf576128bf614589565b60200260200101518111156128e057816128d881614d69565b9250506128ad565b818313612971578582815181106128f9576128f9614589565b602002602001015186848151811061291357612913614589565b602002602001015187858151811061292d5761292d614589565b6020026020010188858151811061294657612946614589565b6020908102919091010191909152528261295f81614d38565b935050818061296d90614d69565b9250505b612872565b8185121561298957612989868684612824565b8383121561299c5761299c868486612824565b505050505050565b81818082036129b4575050611d6d565b60008560026129c38787614c61565b6129cd9190614c81565b6129d79087614d10565b815181106129e7576129e7614589565b602002602001015190505b818313612b7e575b80868481518110612a0d57612a0d614589565b60200260200101511115612a2d5782612a2581614d38565b9350506129fa565b858281518110612a3f57612a3f614589565b6020026020010151811115612a605781612a5881614d69565b925050612a2d565b818313612b7957858281518110612a7957612a79614589565b6020026020010151868481518110612a9357612a93614589565b6020026020010151878581518110612aad57612aad614589565b60200260200101888581518110612ac657612ac6614589565b6020026020010182815250828152505050868281518110612ae957612ae9614589565b6020026020010151878481518110612b0357612b03614589565b6020026020010151888581518110612b1d57612b1d614589565b60200260200101898581518110612b3657612b36614589565b73ffffffffffffffffffffffffffffffffffffffff93841660209182029290920101529116905282612b6781614d38565b9350508180612b7590614d69565b9250505b6129f2565b81851215612b9257612b92878787856129a4565b83831215612ba657612ba6878785876129a4565b50505050505050565b836008015484600701548560060154612bc89190614a02565b10612c2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f2072656c6561736500000060448201526064016104fc565b612c3e843085856000866131e2565b6001846007016000828254612c539190614a02565b909155505050505050565b6000612c6984610c9d565b905060008290508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600081518110612ca057612ca0614589565b602002602001015185600001546001612cb99190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600181518110612d8a57612d8a614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526002606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612e2057600080fd5b505af1158015612e34573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600281518110612e6857612e68614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015612eff57600080fd5b505af1158015612f13573d6000803e3d6000fd5b505050505050505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90612f7684611e06565b612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f742065786973740000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600983016020526040902054841461306c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d65000000000000000000000000000000000060448201526064016104fc565b600481015460ff16158061308f5750600481015460ff6101009091041615156001145b6130f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e636520737461727465640000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561125b6005820184613586565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c6890606401600060405180830381600087803b1580156131a457600080fd5b505af115801561046d573d6000803e3d6000fd5b60008260000182815481106131cf576131cf614589565b9060005260206000200154905092915050565b3073ffffffffffffffffffffffffffffffffffffffff86160361334c5760028601541561325157600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f1935050505015801561324f573d6000803e3d6000fd5b505b6004860154156132a357600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f193505050501580156132a1573d6000803e3d6000fd5b505b6005860154156132f557600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f193505050501580156132f3573d6000803e3d6000fd5b505b60038601541561334757600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613345573d6000803e3d6000fd5b505b6133f0565b6003860154600587015460048801546002890154600093929161336e91614a02565b6133789190614a02565b6133829190614a02565b9050803410156133ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f7700000000000000000000000000000060448201526064016104fc565b505b60005b600a870154811015612ba657600087600a01828154811061341657613416614589565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061345257613452614589565b90600052602060002001549050600089600901848154811061347657613476614589565b60009182526020808320908204015460ff601f9092166101000a90041691508a818360028111156134a9576134a9614dc0565b60028111156134ba576134ba614dc0565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561350957613509614dc0565b036135225761351d84828c8c8c8c8c6135a8565b61356f565b600282600281111561353657613536614dc0565b036135465761351d84828c613720565b600182600281111561355a5761355a614dc0565b0361356f5761356f8484838d8d8d8d8d6138eb565b50505050808061357e906146e6565b9150506133f3565b6000610cd18373ffffffffffffffffffffffffffffffffffffffff8416613cd2565b6135bb8786838960020160010154613dcc565b6135ce8786848960040160010154613dcc565b6135e18786868960060160010154613dcc565b6135f48786858960080160010154613dcc565b600186015487908015801590613620575073ffffffffffffffffffffffffffffffffffffffff87163014155b15612f13576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015613694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b89190614def565b1015612f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e7300000000000000000060448201526064016104fc565b6003820154839015801561373657506005830154155b801561374457506007830154155b801561375257506009830154155b6137b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f72746564000060448201526064016104fc565b6001830154158015906137e1575073ffffffffffffffffffffffffffffffffffffffff82163014155b15611d6d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015613856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061387a9190614def565b600185015490915081101561125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e63650000000000000060448201526064016104fc565b6001860154889080156139ff576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa15801561396d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139919190614def565b9050818110156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c69640000000060448201526064016104fc565b505b5060078701548015613a85578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b8152600401613a52959493929190614e08565b600060405180830381600087803b158015613a6c57600080fd5b505af1158015613a80573d6000803e3d6000fd5b505050505b5060098701548015613b0b578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b8152600401613ad8959493929190614e08565b600060405180830381600087803b158015613af257600080fd5b505af1158015613b06573d6000803e3d6000fd5b505050505b5060058701548015613c405773ffffffffffffffffffffffffffffffffffffffff8416613bc6576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b158015613ba957600080fd5b505af1158015613bbd573d6000803e3d6000fd5b50505050613c40565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b8152600401613c0d959493929190614e08565b600060405180830381600087803b158015613c2757600080fd5b505af1158015613c3b573d6000803e3d6000fd5b505050505b5060038701548015613cc6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b8152600401613c93959493929190614e08565b600060405180830381600087803b158015613cad57600080fd5b505af1158015613cc1573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015613dbb576000613cf6600183614c4e565b8554909150600090613d0a90600190614c4e565b9050818114613d6f576000866000018281548110613d2a57613d2a614589565b9060005260206000200154905080876000018481548110613d4d57613d4d614589565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613d8057613d80614ee9565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061147c565b600091505061147c565b5092915050565b83811561125b573073ffffffffffffffffffffffffffffffffffffffff851603613f315773ffffffffffffffffffffffffffffffffffffffff831615613eac576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190614c2c565b5061125b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015613f1457600080fd5b505af1158015613f28573d6000803e3d6000fd5b5050505061125b565b73ffffffffffffffffffffffffffffffffffffffff831615613fb0576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401613e63565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af115801561402b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061404f9190614c2c565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401612ee5565b82805482825590600052602060002090810192821561411d579160200282015b8281111561411d57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906140c3565b5061412992915061412d565b5090565b5b80821115614129576000815560010161412e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b8576141b8614142565b604052919050565b600067ffffffffffffffff8211156141da576141da614142565b5060051b60200190565b600082601f8301126141f557600080fd5b8135602061420a614205836141c0565b614171565b82815260059290921b8401810191818101908684111561422957600080fd5b8286015b84811015614244578035835291830191830161422d565b509695505050505050565b600082601f83011261426057600080fd5b813567ffffffffffffffff81111561427a5761427a614142565b6142ab60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614171565b8181528460208386010111156142c057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126142ee57600080fd5b813560206142fe614205836141c0565b82815260059290921b8401810191818101908684111561431d57600080fd5b8286015b8481101561424457803567ffffffffffffffff8111156143415760008081fd5b61434f8986838b010161424f565b845250918301918301614321565b6000806000806080858703121561437357600080fd5b8435935060208086013567ffffffffffffffff8082111561439357600080fd5b818801915088601f8301126143a757600080fd5b81356143b5614205826141c0565b81815260059190911b8301840190848101908b8311156143d457600080fd5b8585015b8381101561440c578035858111156143f05760008081fd5b6143fe8e89838a01016141e4565b8452509186019186016143d8565b5097505050604088013592508083111561442557600080fd5b61443189848a016142dd565b9450606088013592508083111561444757600080fd5b5050614455878288016141e4565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff8116811461448557600080fd5b919050565b60006020828403121561449c57600080fd5b813567ffffffffffffffff808211156144b457600080fd5b90830190608082860312156144c857600080fd5b6040516080810181811083821117156144e3576144e3614142565b604052823581526020830135828111156144fc57600080fd5b6145088782860161424f565b6020830152506040830135604082015261452460608401614461565b606082015295945050505050565b60008060006060848603121561454757600080fd5b83359250602084013567ffffffffffffffff81111561456557600080fd5b6145718682870161424f565b92505061458060408501614461565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c908216806145cc57607f821691505b602082108103614605577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60005b8381101561462657818101518382015260200161460e565b50506000910152565b6000825161464181846020870161460b565b9190910192915050565b6000815180845261466381602086016020860161460b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815260006146a8604083018561464b565b90508260208301529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b5060010190565b600081518084526020808501945080840160005b8381101561474e57815187529582019590820190600101614732565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a157828403895261478f84835161464b565b98850198935090840190600101614777565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a15782840389526147e484835161471e565b988501989350908401906001016147cc565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561484557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614813565b50505083810382850152614859818961471e565b915050828103604084015261486e8187614759565b90508281036060840152614882818661471e565b9050828103608084015261489681856147ae565b98975050505050505050565b601f82111561155157600081815260208120601f850160051c810160208610156148c95750805b601f850160051c820191505b8181101561299c578281556001016148d5565b815167ffffffffffffffff81111561490257614902614142565b6149168161491084546145b8565b846148a2565b602080601f83116001811461496957600084156149335750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561299c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156149b657888601518255948401946001909101908401614997565b50858210156149f257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561147c5761147c6146b7565b8281526040602082015260006121ba604083018461464b565b602081526000610cd1602083018461464b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b815160009082906020808601845b83811015614a9a57815185529382019390820190600101614a7e565b50929695505050505050565b815160009082906020808601845b83811015614a9a57815173ffffffffffffffffffffffffffffffffffffffff1685529382019390820190600101614ab4565b600181815b80851115614b3f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b2557614b256146b7565b80851615614b3257918102915b93841c9390800290614aeb565b509250929050565b600082614b565750600161147c565b81614b635750600061147c565b8160018114614b795760028114614b8357614b9f565b600191505061147c565b60ff841115614b9457614b946146b7565b50506001821b61147c565b5060208310610133831016604e8410600b8410161715614bc2575081810a61147c565b614bcc8383614ae6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614bfe57614bfe6146b7565b029392505050565b6000610cd160ff841683614b47565b808202811582820484141761147c5761147c6146b7565b600060208284031215614c3e57600080fd5b81518015158114610cd157600080fd5b8181038181111561147c5761147c6146b7565b8181036000831280158383131683831282161715613dc557613dc56146b7565b600082614cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615614d0b57614d0b6146b7565b500590565b8082018281126000831280158216821582161715614d3057614d306146b7565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b60007f80000000000000000000000000000000000000000000000000000000000000008203614d9a57614d9a6146b7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215614e0157600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a06080850152600091508454614e4f816145b8565b8060a087015260c0600180841660008114614e715760018114614ea957614ed7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650614ed7565b896000528560002060005b85811015614ecf5781548b8201860152908301908701614eb4565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220540c492d259dc9b092a36ec0d3ad8e4be72d3e916613780d195fe17b6cee9b6e64736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630c6446d514610046578063463bc3551461005b5780636a9947351461006e575b600080fd5b61005961005436600461435d565b610081565b005b61005961006936600461448a565b610477565b61005961007c366004614532565b6107d1565b61008b8433610ac3565b61009484610b7f565b61009d84610c2a565b60006100a885610c9d565b60008681527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101549192506100e587610cd8565b9050816001146102465760006100fc888887610d14565b91505060005b825181101561024357600085600201600088848151811061012557610125614589565b602002602001015181526020019081526020016000208054610146906145b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610172906145b8565b80156101bf5780601f10610194576101008083540402835291602001916101bf565b820191906000526020600020905b8154815290600101906020018083116101a257829003601f168201915b50505050509050806040516101d4919061462f565b6040518091039020858b7f71cc117353a39d910a72175a56496eefb857568810a5f5b11079400201be4dd48487878151811061021257610212614589565b6020026020010151604051610228929190614695565b60405180910390a4508061023b816146e6565b915050610102565b50505b600061025188611001565b91505061028c8860009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015490565b887f69a9400160c8f6e71eb8c0ab9c5824e20304af8146719a7625c9d15675ebb6d384848a8a8d6040516102c49594939291906147f6565b60405180910390a36000600685018190555b8251811015610445576000801b8560050160008584815181106102fb576102fb614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060405180602001604052806000815250856002016000838152602001908152602001600020908161037291906148e8565b50600085600c01600085848151811061038d5761038d614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000801b85600701600085848151811061040257610402614589565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020558061043d816146e6565b9150506102d6565b50600a84018054600b86015560009081905560038501805460048701555561046d8887611115565b5050505050505050565b805161048290611262565b805161048e9033610ac3565b8051610499906112d9565b15610505576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b805161051090610b7f565b600061051f8260000151610c9d565b8251606084015173ffffffffffffffffffffffffffffffffffffffff1660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f366020526040902054919250146105d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206120706c61796572000000000000000000000000000000000000000060448201526064016104fc565b816020015151600003610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f742070726f706f736520656d70747900000000000000000000000060448201526064016104fc565b606082015173ffffffffffffffffffffffffffffffffffffffff166000908152600582016020526040902054156106d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f416c72656164792070726f706f7365642100000000000000000000000000000060448201526064016104fc565b815160009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060010154604080850151606086015173ffffffffffffffffffffffffffffffffffffffff1660009081526005860160205291822055600684018054929350600192909190610754908490614a02565b9091555050606083015183516107699161137b565b50826060015173ffffffffffffffffffffffffffffffffffffffff168184600001517f525b2e06a8f927c08033ec5d6334d7796bbea62d2d4f0486fe60196d4fe6d0ad866040015187602001516040516107c4929190614a15565b60405180910390a4505050565b6107db8333610ac3565b6107e483611262565b6107ed83610b7f565b6107f6836112d9565b1561085d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b6108678382611482565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060019081015411610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4e6f2070726f706f73616c73206578697374206174207475726e20313a20636160448201527f6e6e6f7420766f7465000000000000000000000000000000000000000000000060648201526084016104fc565b600061093284610c9d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c8201602052604090205490915060ff16156109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f416c726561647920766f7465640000000000000000000000000000000000000060448201526064016104fc565b600181600a0160008282546109dc9190614a02565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600c82016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a3b848361137b565b5060008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206001015473ffffffffffffffffffffffffffffffffffffffff831690857f70a202954fc6b6d8015f8bcfbc543189e19810d2e7e964e655ab5922d1ac5b4e86604051610ab59190614a2e565b60405180910390a450505050565b610acc82611262565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4f6e6c792067616d65206d61737465720000000000000000000000000000000060448201526064016104fc565b5050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812090829003610bbc57610bbc614a41565b600481015460ff16610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f47616d6520686173206e6f74207965742073746172746564000000000000000060448201526064016104fc565b610c33816112d9565b15610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f47616d65206f766572000000000000000000000000000000000000000000000060448201526064016104fc565b50565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090610cd160058201611556565b6060806000610d2286610cd8565b90506000815167ffffffffffffffff811115610d4057610d40614142565b604051908082528060200260200182016040528015610d69578160200160208202803683370190505b5090506000825167ffffffffffffffff811115610d8857610d88614142565b604051908082528060200260200182016040528015610db1578160200160208202803683370190505b5090506000835167ffffffffffffffff811115610dd057610dd0614142565b604051908082528060200260200182016040528015610df9578160200160208202803683370190505b5090506000610e06611563565b90506000610e138b610c9d565b905060005b8651811015610ebd5781600c016000888381518110610e3957610e39614589565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16848281518110610e9b57610e9b614589565b9115156020928302919091019091015280610eb5816146e6565b915050610e18565b5060068201548951604080516060810182526005860154815260208101849052600786015491810191909152610ef89290918d91879161158c565b935060005b8651811015610fef5786518a8281518110610f1a57610f1a614589565b60200260200101511015610fdd57848181518110610f3a57610f3a614589565b6020026020010151610f6e888381518110610f5757610f57614589565b60200260200101518e61182f90919063ffffffff16565b610f789190614a02565b868281518110610f8a57610f8a614589565b602002602001018181525050610fdd878281518110610fab57610fab614589565b6020026020010151878381518110610fc557610fc5614589565b60200260200101518e6118879092919063ffffffff16565b80610fe7816146e6565b915050610efd565b50939a92995091975050505050505050565b606080600061100f84610cd8565b90506000815167ffffffffffffffff81111561102d5761102d614142565b604051908082528060200260200182016040528015611056578160200160208202803683370190505b50905060005b825181101561110a576110db8684838151811061107b5761107b614589565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b8282815181106110ed576110ed614589565b602090810291909101015280611102816146e6565b91505061105c565b509094909350915050565b600080600061112385611952565b9250925092508280156111335750815b156111645760405185907f16b81a8b7a63ff74301aeb7a5b3048ff92880ec2bb0773136ed953bf4ef6f47390600090a25b82156111965760405185907f355ab9c54569d91a1467b11b130e91c3f6c15c3c50c7225177cfaf66ba44ddd090600090a25b80156112515760006111e96111df7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b8790611b01611b59565b905060006111f687610cd8565b9050816040516112069190614a70565b60405180910390208160405161121c9190614aa6565b6040519081900381209089907f310cab2765035ece7f5c89e2f74e216e41485f0911e38063d06de80c47e14b7e90600090a450505b61125b8585611ceb565b5050505050565b61126a611d73565b61127381611e06565b610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e640000000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156113625750600b81015460ff16155b15611371575060019392505050565b5060009392505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206001015460006113b6611563565b905060006113c386610c9d565b90506001808481036113d457600091505b6007840154600484015410156113e957600091505b6001828015611420575073ffffffffffffffffffffffffffffffffffffffff88166000908152600c8501602052604090205460ff16155b15611429575060005b81801561145b575073ffffffffffffffffffffffffffffffffffffffff88166000908152600585016020526040902054155b15611464575060005b8015611474576114748989611e62565b955050505050505b92915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908314611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b505050565b60606000610cd1836120e7565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261147c565b606060008267ffffffffffffffff8111156115a9576115a9614142565b6040519080825280602002602001820160405280156115d2578160200160208202803683370190505b5090506000865167ffffffffffffffff8111156115f1576115f1614142565b60405190808252806020026020018201604052801561161a578160200160208202803683370190505b50905060005b8481101561182257600083828151811061163c5761163c614589565b60200260200101818152505060005b885181101561180f57600089828151811061166857611668614589565b6020026020010151905088828151811061168457611684614589565b60200260200101516116e157878584815181106116a3576116a3614589565b602002602001018181516116b79190614a02565b9052508a5184518590849081106116d0576116d0614589565b6020026020010181815250506117fc565b8083815181106116f3576116f3614589565b602002602001015185848151811061170d5761170d614589565b602002602001018181516117219190614a02565b905250805160029082908590811061173b5761173b614589565b602002602001015161174d9190614c06565b84838151811061175f5761175f614589565b602002602001018181516117739190614a02565b9052508a51845185908490811061178c5761178c614589565b602002602001015111156117fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f7200000000000000000000000060448201526064016104fc565b5080611807816146e6565b91505061164b565b508061181a816146e6565b915050611620565b5090979650505050505050565b60009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206118be8484612143565b611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f706c61796572206e6f7420696e20612067616d6500000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff9092166000908152600990920160205260409091205550565b6000806000611960846121c2565b6119c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6578745475726e2d3e43616e456e644561726c79000000000000000000000060448201526064016104fc565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206119fc8161224b565b6001816001016000828254611a119190614a02565b90915550504260028201556000611a27866122da565b90508080611a395750600b82015460ff165b15611a7c576000611a4987612361565b600b840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055505b611a85866112d9565b600483018054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055611ac586612452565b508051611adb90600c85019060208401906140a3565b5050600b82015460049092015490945060ff918216935061010090041690509193909250565b6000611b0c83610c9d565b600181015490915061155190849073ffffffffffffffffffffffffffffffffffffffff16611b3982612489565b600081518110611b4b57611b4b614589565b602002602001015185612529565b6060611b6484611262565b611b7684611b7186612489565b61258c565b6000611b8185611001565b9150506000611b8f86610cd8565b905060005b8151811015611bf957611bc087838381518110611bb357611bb3614589565b6020026020010151612630565b611be787838381518110611bd657611bd6614589565b60200260200101518763ffffffff16565b80611bf1816146e6565b915050611b94565b506000611c04611563565b600181015481548451600284015493945073ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb928a9291611c419190614c15565b611c4b9190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdf9190614c2c565b50919695505050505050565b6000611cf683610c9d565b905060005b8251811015611d6d57828181518110611d1657611d16614589565b60200260200101518260020160008381526020019081526020016000209081611d3f91906148e8565b506001826003016000828254611d559190614a02565b90915550819050611d65816146e6565b915050611cfb565b50505050565b6000611d7d611563565b600481015490915074010000000000000000000000000000000000000000900460ff16610c9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a6564000000000000000000000000000000000060448201526064016104fc565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff1615611e595750600192915050565b50600092915050565b81611e6c816126f7565b15611ed3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f6e6c79496e5475726e54696d65202d3e207475726e2074696d65646f75740060448201526064016104fc565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020611f0984610b7f565b611f1284610c2a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260078201602052604090205460ff1615611fa4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c7265616479206d6164652061206d6f76650000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260409020547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908514612073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6973206e6f7420696e207468652067616d65000000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600783016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600884018054919290916120db908490614a02565b90915550505050505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561213757602002820191906000526020600020905b815481526020019060010190808311612123575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9084146121b75760006121ba565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060006121fd8260050161279a565b82600801541461220e576000612211565b60015b600483015490915060ff16158061222c575061222c846112d9565b1561223b575060009392505050565b80806113625750611362846127a4565b60005b61225a8260050161279a565b8110156122cf5760006122706005840183612818565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550806122c7816146e6565b91505061224e565b506000600890910155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92919003611371575060019392505050565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d818061238f85611001565b915091506123ac816000600184516123a79190614c4e565b612824565b60005b600183516123bd9190614c4e565b8110156124465760058401546123d590600190614c4e565b811161242f57816123e7826001614a02565b815181106123f7576123f7614589565b602002602001015182828151811061241157612411614589565b60200260200101510361242a5750600195945050505050565b612434565b612446565b8061243e816146e6565b9150506123af565b50600095945050505050565b60608060008061246185611001565b9150915061247f828260006001855161247a9190614c4e565b6129a4565b9094909350915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060609190600c810180546040805160208084028201810190925282815293945083018282801561251c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116124f1575b5050505050915050919050565b600061257e8560408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061125b81858585612baf565b600061259783610c9d565b905060006125a3611563565b60048101549091506125ce908590859073ffffffffffffffffffffffffffffffffffffffff16612c5e565b60005b600883015481101561125b5761261e85858560080184815481106125f7576125f7614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612c5e565b80612628816146e6565b9150506125d1565b61263982611262565b6126438282612f1e565b600061264d611563565b9050600061265a84610c9d565b9050600181600001541115611d6d578054600483015461269191859173ffffffffffffffffffffffffffffffffffffffff1661312a565b60005b600882015481101561125b576126e58483600001548460080184815481106126be576126be614589565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1661312a565b806126ef816146e6565b915050612694565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908360000361275657612756614a41565b600481015460ff16151560011461276f5761276f614a41565b600281015482546127809190614a02565b4211612790575060009392505050565b5060019392505050565b600061147c825490565b6000806127b0836126f7565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806127f957506127f9846112d9565b15612808575060009392505050565b8115611371575060019392505050565b6000610cd183836131b8565b8181808203612834575050505050565b60008560026128438787614c61565b61284d9190614c81565b6128579087614d10565b8151811061286757612867614589565b602002602001015190505b818313612976575b8086848151811061288d5761288d614589565b602002602001015111156128ad57826128a581614d38565b93505061287a565b8582815181106128bf576128bf614589565b60200260200101518111156128e057816128d881614d69565b9250506128ad565b818313612971578582815181106128f9576128f9614589565b602002602001015186848151811061291357612913614589565b602002602001015187858151811061292d5761292d614589565b6020026020010188858151811061294657612946614589565b6020908102919091010191909152528261295f81614d38565b935050818061296d90614d69565b9250505b612872565b8185121561298957612989868684612824565b8383121561299c5761299c868486612824565b505050505050565b81818082036129b4575050611d6d565b60008560026129c38787614c61565b6129cd9190614c81565b6129d79087614d10565b815181106129e7576129e7614589565b602002602001015190505b818313612b7e575b80868481518110612a0d57612a0d614589565b60200260200101511115612a2d5782612a2581614d38565b9350506129fa565b858281518110612a3f57612a3f614589565b6020026020010151811115612a605781612a5881614d69565b925050612a2d565b818313612b7957858281518110612a7957612a79614589565b6020026020010151868481518110612a9357612a93614589565b6020026020010151878581518110612aad57612aad614589565b60200260200101888581518110612ac657612ac6614589565b6020026020010182815250828152505050868281518110612ae957612ae9614589565b6020026020010151878481518110612b0357612b03614589565b6020026020010151888581518110612b1d57612b1d614589565b60200260200101898581518110612b3657612b36614589565b73ffffffffffffffffffffffffffffffffffffffff93841660209182029290920101529116905282612b6781614d38565b9350508180612b7590614d69565b9250505b6129f2565b81851215612b9257612b92878787856129a4565b83831215612ba657612ba6878785876129a4565b50505050505050565b836008015484600701548560060154612bc89190614a02565b10612c2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f2072656c6561736500000060448201526064016104fc565b612c3e843085856000866131e2565b6001846007016000828254612c539190614a02565b909155505050505050565b6000612c6984610c9d565b905060008290508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600081518110612ca057612ca0614589565b602002602001015185600001546001612cb99190614a02565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600181518110612d8a57612d8a614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526002606482015260a06084820152600060a482015260c401600060405180830381600087803b158015612e2057600080fd5b505af1158015612e34573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663f242432a3086600281518110612e6857612e68614589565b602090810291909101015185546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526001606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015612eff57600080fd5b505af1158015612f13573d6000803e3d6000fd5b505050505050505050565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90612f7684611e06565b612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f742065786973740000000000000000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600983016020526040902054841461306c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d65000000000000000000000000000000000060448201526064016104fc565b600481015460ff16158061308f5750600481015460ff6101009091041615156001145b6130f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e636520737461727465640000000000000060448201526064016104fc565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561125b6005820184613586565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c6890606401600060405180830381600087803b1580156131a457600080fd5b505af115801561046d573d6000803e3d6000fd5b60008260000182815481106131cf576131cf614589565b9060005260206000200154905092915050565b3073ffffffffffffffffffffffffffffffffffffffff86160361334c5760028601541561325157600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f1935050505015801561324f573d6000803e3d6000fd5b505b6004860154156132a357600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f193505050501580156132a1573d6000803e3d6000fd5b505b6005860154156132f557600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f193505050501580156132f3573d6000803e3d6000fd5b505b60038601541561334757600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613345573d6000803e3d6000fd5b505b6133f0565b6003860154600587015460048801546002890154600093929161336e91614a02565b6133789190614a02565b6133829190614a02565b9050803410156133ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f7700000000000000000000000000000060448201526064016104fc565b505b60005b600a870154811015612ba657600087600a01828154811061341657613416614589565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061345257613452614589565b90600052602060002001549050600089600901848154811061347657613476614589565b60009182526020808320908204015460ff601f9092166101000a90041691508a818360028111156134a9576134a9614dc0565b60028111156134ba576134ba614dc0565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561350957613509614dc0565b036135225761351d84828c8c8c8c8c6135a8565b61356f565b600282600281111561353657613536614dc0565b036135465761351d84828c613720565b600182600281111561355a5761355a614dc0565b0361356f5761356f8484838d8d8d8d8d6138eb565b50505050808061357e906146e6565b9150506133f3565b6000610cd18373ffffffffffffffffffffffffffffffffffffffff8416613cd2565b6135bb8786838960020160010154613dcc565b6135ce8786848960040160010154613dcc565b6135e18786868960060160010154613dcc565b6135f48786858960080160010154613dcc565b600186015487908015801590613620575073ffffffffffffffffffffffffffffffffffffffff87163014155b15612f13576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015613694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b89190614def565b1015612f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e7300000000000000000060448201526064016104fc565b6003820154839015801561373657506005830154155b801561374457506007830154155b801561375257506009830154155b6137b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f72746564000060448201526064016104fc565b6001830154158015906137e1575073ffffffffffffffffffffffffffffffffffffffff82163014155b15611d6d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015613856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061387a9190614def565b600185015490915081101561125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e63650000000000000060448201526064016104fc565b6001860154889080156139ff576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa15801561396d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139919190614def565b9050818110156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c69640000000060448201526064016104fc565b505b5060078701548015613a85578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b8152600401613a52959493929190614e08565b600060405180830381600087803b158015613a6c57600080fd5b505af1158015613a80573d6000803e3d6000fd5b505050505b5060098701548015613b0b578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b8152600401613ad8959493929190614e08565b600060405180830381600087803b158015613af257600080fd5b505af1158015613b06573d6000803e3d6000fd5b505050505b5060058701548015613c405773ffffffffffffffffffffffffffffffffffffffff8416613bc6576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b158015613ba957600080fd5b505af1158015613bbd573d6000803e3d6000fd5b50505050613c40565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b8152600401613c0d959493929190614e08565b600060405180830381600087803b158015613c2757600080fd5b505af1158015613c3b573d6000803e3d6000fd5b505050505b5060038701548015613cc6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b8152600401613c93959493929190614e08565b600060405180830381600087803b158015613cad57600080fd5b505af1158015613cc1573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015613dbb576000613cf6600183614c4e565b8554909150600090613d0a90600190614c4e565b9050818114613d6f576000866000018281548110613d2a57613d2a614589565b9060005260206000200154905080876000018481548110613d4d57613d4d614589565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613d8057613d80614ee9565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061147c565b600091505061147c565b5092915050565b83811561125b573073ffffffffffffffffffffffffffffffffffffffff851603613f315773ffffffffffffffffffffffffffffffffffffffff831615613eac576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190614c2c565b5061125b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015613f1457600080fd5b505af1158015613f28573d6000803e3d6000fd5b5050505061125b565b73ffffffffffffffffffffffffffffffffffffffff831615613fb0576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401613e63565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af115801561402b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061404f9190614c2c565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401612ee5565b82805482825590600052602060002090810192821561411d579160200282015b8281111561411d57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906140c3565b5061412992915061412d565b5090565b5b80821115614129576000815560010161412e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b8576141b8614142565b604052919050565b600067ffffffffffffffff8211156141da576141da614142565b5060051b60200190565b600082601f8301126141f557600080fd5b8135602061420a614205836141c0565b614171565b82815260059290921b8401810191818101908684111561422957600080fd5b8286015b84811015614244578035835291830191830161422d565b509695505050505050565b600082601f83011261426057600080fd5b813567ffffffffffffffff81111561427a5761427a614142565b6142ab60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614171565b8181528460208386010111156142c057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126142ee57600080fd5b813560206142fe614205836141c0565b82815260059290921b8401810191818101908684111561431d57600080fd5b8286015b8481101561424457803567ffffffffffffffff8111156143415760008081fd5b61434f8986838b010161424f565b845250918301918301614321565b6000806000806080858703121561437357600080fd5b8435935060208086013567ffffffffffffffff8082111561439357600080fd5b818801915088601f8301126143a757600080fd5b81356143b5614205826141c0565b81815260059190911b8301840190848101908b8311156143d457600080fd5b8585015b8381101561440c578035858111156143f05760008081fd5b6143fe8e89838a01016141e4565b8452509186019186016143d8565b5097505050604088013592508083111561442557600080fd5b61443189848a016142dd565b9450606088013592508083111561444757600080fd5b5050614455878288016141e4565b91505092959194509250565b803573ffffffffffffffffffffffffffffffffffffffff8116811461448557600080fd5b919050565b60006020828403121561449c57600080fd5b813567ffffffffffffffff808211156144b457600080fd5b90830190608082860312156144c857600080fd5b6040516080810181811083821117156144e3576144e3614142565b604052823581526020830135828111156144fc57600080fd5b6145088782860161424f565b6020830152506040830135604082015261452460608401614461565b606082015295945050505050565b60008060006060848603121561454757600080fd5b83359250602084013567ffffffffffffffff81111561456557600080fd5b6145718682870161424f565b92505061458060408501614461565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c908216806145cc57607f821691505b602082108103614605577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60005b8381101561462657818101518382015260200161460e565b50506000910152565b6000825161464181846020870161460b565b9190910192915050565b6000815180845261466381602086016020860161460b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815260006146a8604083018561464b565b90508260208301529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b5060010190565b600081518084526020808501945080840160005b8381101561474e57815187529582019590820190600101614732565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a157828403895261478f84835161464b565b98850198935090840190600101614777565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156147a15782840389526147e484835161471e565b988501989350908401906001016147cc565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561484557815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614813565b50505083810382850152614859818961471e565b915050828103604084015261486e8187614759565b90508281036060840152614882818661471e565b9050828103608084015261489681856147ae565b98975050505050505050565b601f82111561155157600081815260208120601f850160051c810160208610156148c95750805b601f850160051c820191505b8181101561299c578281556001016148d5565b815167ffffffffffffffff81111561490257614902614142565b6149168161491084546145b8565b846148a2565b602080601f83116001811461496957600084156149335750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561299c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156149b657888601518255948401946001909101908401614997565b50858210156149f257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561147c5761147c6146b7565b8281526040602082015260006121ba604083018461464b565b602081526000610cd1602083018461464b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b815160009082906020808601845b83811015614a9a57815185529382019390820190600101614a7e565b50929695505050505050565b815160009082906020808601845b83811015614a9a57815173ffffffffffffffffffffffffffffffffffffffff1685529382019390820190600101614ab4565b600181815b80851115614b3f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b2557614b256146b7565b80851615614b3257918102915b93841c9390800290614aeb565b509250929050565b600082614b565750600161147c565b81614b635750600061147c565b8160018114614b795760028114614b8357614b9f565b600191505061147c565b60ff841115614b9457614b946146b7565b50506001821b61147c565b5060208310610133831016604e8410600b8410161715614bc2575081810a61147c565b614bcc8383614ae6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614bfe57614bfe6146b7565b029392505050565b6000610cd160ff841683614b47565b808202811582820484141761147c5761147c6146b7565b600060208284031215614c3e57600080fd5b81518015158114610cd157600080fd5b8181038181111561147c5761147c6146b7565b8181036000831280158383131683831282161715613dc557613dc56146b7565b600082614cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615614d0b57614d0b6146b7565b500590565b8082018281126000831280158216821582161715614d3057614d306146b7565b505092915050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614717576147176146b7565b60007f80000000000000000000000000000000000000000000000000000000000000008203614d9a57614d9a6146b7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215614e0157600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a06080850152600091508454614e4f816145b8565b8060a087015260c0600180841660008114614e715760018114614ea957614ed7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650614ed7565b896000528560002060005b85811015614ecf5781548b8201860152908301908701614eb4565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220540c492d259dc9b092a36ec0d3ad8e4be72d3e916613780d195fe17b6cee9b6e64736f6c63430008140033", "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/anvil/RankifyInstanceGameOwnersFacet.json b/deployments/anvil/RankifyInstanceGameOwnersFacet.json index 9d2f070..d5330b8 100644 --- a/deployments/anvil/RankifyInstanceGameOwnersFacet.json +++ b/deployments/anvil/RankifyInstanceGameOwnersFacet.json @@ -1,5 +1,5 @@ { - "address": "0xa8CE553e9dc807dB4caC12F43D50D19200d9ec84", + "address": "0xD10B43A07ad4EEcfDd0018eA6CaBeB69F8d0eF4C", "abi": [ { "inputs": [ @@ -106,7 +106,7 @@ "type": "function" } ], - "transactionHash": "0x47fbb6cd97970703457824eaf6501fbdfd145c5a4321f1013d2dbe5df474e95c", + "transactionHash": "0x10eaec9bc699a38ba88a83e108bc02e57c0fc846d851984364e940fb03fbdb0d", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", @@ -114,20 +114,20 @@ "transactionIndex": 0, "gasUsed": "536557", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6689f228bb5f200683fdf9adbd4b374ee9a9a814e4034fc1d03c91ddbe3fc212", - "transactionHash": "0x47fbb6cd97970703457824eaf6501fbdfd145c5a4321f1013d2dbe5df474e95c", + "blockHash": "0x26e4387d33460fac3722c2541c1dbb06fd7faba83f71d66383f123e977c2edb9", + "transactionHash": "0x10eaec9bc699a38ba88a83e108bc02e57c0fc846d851984364e940fb03fbdb0d", "logs": [], - "blockNumber": 349, + "blockNumber": 493, "cumulativeGasUsed": "536557", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 3, - "solcInputHash": "b1aa3cbe1a5743c4bdac70109683ca8f", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"setGamePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"setJoinGamePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxPlayersSize\",\"type\":\"uint256\"}],\"name\":\"setMaxPlayersSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxTurns\",\"type\":\"uint256\"}],\"name\":\"setMaxTurns\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMinPlayersSize\",\"type\":\"uint256\"}],\"name\":\"setMinPlayersSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRankToken\",\"type\":\"address\"}],\"name\":\"setRankTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newTimePerTurn\",\"type\":\"uint256\"}],\"name\":\"setTimePerTurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newTimeToJoin\",\"type\":\"uint256\"}],\"name\":\"setTimeToJoin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"setGamePrice(uint256)\":{\"details\":\"Sets the game price. `newPrice` is the new game price. Modifies: - Sets the game price to `newPrice`. Requirements: - The caller must be the contract owner.\"},\"setJoinGamePrice(uint256)\":{\"details\":\"Sets the join game price. `newPrice` is the new join game price. Modifies: - Sets the join game price to `newPrice`. Requirements: - The caller must be the contract owner.\"},\"setMaxPlayersSize(uint256)\":{\"details\":\"Sets the maximum number of players in a game. `newMaxPlayersSize` is the new maximum number of players. Modifies: - Sets the maximum number of players to `newMaxPlayersSize`. Requirements: - The caller must be the contract owner. - `newMaxPlayersSize` must be greater than or equal to the minimum number of players.\"},\"setMaxTurns(uint256)\":{\"details\":\"Sets the maximum number of turns in a game. `newMaxTurns` is the new maximum number of turns. Modifies: - Sets the maximum number of turns to `newMaxTurns`. Requirements: - The caller must be the contract owner. - `newMaxTurns` must not be zero.\"},\"setMinPlayersSize(uint256)\":{\"details\":\"Sets the minimum number of players in a game. `newMinPlayersSize` is the new minimum number of players. Modifies: - Sets the minimum number of players to `newMinPlayersSize`. Requirements: - The caller must be the contract owner. - `newMinPlayersSize` must be less than or equal to the maximum number of players.\"},\"setRankTokenAddress(address)\":{\"details\":\"Sets the rank token address. `newRankToken` is the new rank token address. Modifies: - Sets the rank token address to `newRankToken`. Requirements: - The caller must be the contract owner. - `newRankToken` must not be the zero address. - `newRankToken` must support the ERC1155 interface.\"},\"setTimePerTurn(uint256)\":{\"details\":\"Sets the time per turn. `newTimePerTurn` is the new time per turn. Modifies: - Sets the time per turn to `newTimePerTurn`. Requirements: - The caller must be the contract owner.\"},\"setTimeToJoin(uint256)\":{\"details\":\"Sets the time to join a game. `newTimeToJoin` is the new time to join. Modifies: - Sets the time to join to `newTimeToJoin`. Requirements: - The caller must be the contract owner. - `newTimeToJoin` must not be zero.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceGameOwnersFacet.sol\":\"RankifyInstanceGameOwnersFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceGameOwnersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\n\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\n\\nerror ZeroValue();\\nerror WrongAddress();\\nerror OutOfBounds();\\n\\ncontract RankifyInstanceGameOwnersFacet {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n /**\\n * @dev Sets the game price. `newPrice` is the new game price.\\n *\\n * Modifies:\\n *\\n * - Sets the game price to `newPrice`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setGamePrice(uint256 newPrice) external {\\n LibDiamond.enforceIsContractOwner();\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.gamePrice = newPrice;\\n }\\n\\n /**\\n * @dev Sets the join game price. `newPrice` is the new join game price.\\n *\\n * Modifies:\\n *\\n * - Sets the join game price to `newPrice`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setJoinGamePrice(uint256 newPrice) external {\\n LibDiamond.enforceIsContractOwner();\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.joinGamePrice = newPrice;\\n }\\n\\n /**\\n * @dev Sets the rank token address. `newRankToken` is the new rank token address.\\n *\\n * Modifies:\\n *\\n * - Sets the rank token address to `newRankToken`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newRankToken` must not be the zero address.\\n * - `newRankToken` must support the ERC1155 interface.\\n */\\n function setRankTokenAddress(address newRankToken) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newRankToken == address(0)) {\\n require(false, \\\"zerovalue\\\"); //revert ZeroValue();\\n }\\n if (!ERC165Checker.supportsInterface(newRankToken, type(IERC1155).interfaceId)) {\\n require(false, \\\"wrongaddress\\\"); //revert WrongAddress();\\n }\\n\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.rankTokenAddress = newRankToken;\\n }\\n\\n /**\\n * @dev Sets the time per turn. `newTimePerTurn` is the new time per turn.\\n *\\n * Modifies:\\n *\\n * - Sets the time per turn to `newTimePerTurn`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setTimePerTurn(uint256 newTimePerTurn) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newTimePerTurn == 0) {\\n require(false, \\\"zerovalue\\\"); // revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.timePerTurn = newTimePerTurn;\\n }\\n\\n /**\\n * @dev Sets the maximum number of players in a game. `newMaxPlayersSize` is the new maximum number of players.\\n *\\n * Modifies:\\n *\\n * - Sets the maximum number of players to `newMaxPlayersSize`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMaxPlayersSize` must be greater than or equal to the minimum number of players.\\n */\\n function setMaxPlayersSize(uint256 newMaxPlayersSize) external {\\n LibDiamond.enforceIsContractOwner();\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n if (newMaxPlayersSize < tbg.settings.minPlayersSize) {\\n require(false, \\\"outofbonds\\\"); // revert OutOfBounds();\\n }\\n tbg.settings.maxPlayersSize = newMaxPlayersSize;\\n }\\n\\n /**\\n * @dev Sets the minimum number of players in a game. `newMinPlayersSize` is the new minimum number of players.\\n *\\n * Modifies:\\n *\\n * - Sets the minimum number of players to `newMinPlayersSize`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMinPlayersSize` must be less than or equal to the maximum number of players.\\n */\\n function setMinPlayersSize(uint256 newMinPlayersSize) external {\\n LibDiamond.enforceIsContractOwner();\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n if (newMinPlayersSize > tbg.settings.maxPlayersSize) {\\n require(false, \\\"outofbonds\\\"); // revert OutOfBounds();\\n }\\n tbg.settings.minPlayersSize = newMinPlayersSize;\\n }\\n\\n /**\\n * @dev Sets the time to join a game. `newTimeToJoin` is the new time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the time to join to `newTimeToJoin`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newTimeToJoin` must not be zero.\\n */\\n function setTimeToJoin(uint256 newTimeToJoin) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newTimeToJoin == 0) {\\n require(false, \\\"ZeroValue\\\"); //revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.timeToJoin = newTimeToJoin;\\n }\\n\\n /**\\n * @dev Sets the maximum number of turns in a game. `newMaxTurns` is the new maximum number of turns.\\n *\\n * Modifies:\\n *\\n * - Sets the maximum number of turns to `newMaxTurns`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMaxTurns` must not be zero.\\n */\\n function setMaxTurns(uint256 newMaxTurns) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newMaxTurns == 0) {\\n require(false, \\\"ZeroValue\\\"); // revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.maxTurns = newMaxTurns;\\n }\\n}\\n\",\"keccak256\":\"0x0b06fa4d031fa95852ef8c0013a0ae2e709106bee6f0c7151ddbacb1cac82deb\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * ***WARNING*** This function is unused in the current implementation of the library.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x01cc4615c50c7ab606c54ea358f57db5fd6273518983a5659b21edc771aaa037\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506108d7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063911f8e1b1161005b578063911f8e1b146100db578063924b5bb1146100ee578063966fb1ea14610101578063c94b01da1461011457600080fd5b806326126d461461008d57806359db5bf7146100a257806386517341146100b5578063869dc021146100c8575b600080fd5b6100a061009b366004610852565b610127565b005b6100a06100b0366004610852565b610140565b6100a06100c3366004610852565b61015c565b6100a06100d636600461086b565b61021c565b6100a06100e9366004610852565b610385565b6100a06100fc366004610852565b61041b565b6100a061010f366004610852565b6104d6565b6100a0610122366004610852565b61056c565b61012f610606565b60006101396106d1565b9190915550565b610148610606565b60006101526106d1565b6002019190915550565b610164610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90821015610216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e64730000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60010155565b610224610606565b73ffffffffffffffffffffffffffffffffffffffff81166102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b6102cb817fd9b67a26000000000000000000000000000000000000000000000000000000006106fc565b610331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e67616464726573730000000000000000000000000000000000000000604482015260640161020d565b600061033b6106d1565b60040180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915550565b61038d610606565b806000036103f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3055565b610423610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908211156104d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e647300000000000000000000000000000000000000000000604482015260640161020d565b60020155565b6104de610606565b80600003610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3155565b610574610606565b806000036105de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d610139565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840161020d565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b60006107078361071f565b801561071857506107188383610783565b9392505050565b600061074b827f01ffc9a700000000000000000000000000000000000000000000000000000000610783565b80156106f6575061077c827fffffffff00000000000000000000000000000000000000000000000000000000610783565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d9150600051905082801561083b575060208210155b80156108475750600081115b979650505050505050565b60006020828403121561086457600080fd5b5035919050565b60006020828403121561087d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461071857600080fdfea2646970667358221220dd6d4ce85ef65261b687c3cfbfeb830cef4f51d003d586c71df705dc0b34236f64736f6c63430008140033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063911f8e1b1161005b578063911f8e1b146100db578063924b5bb1146100ee578063966fb1ea14610101578063c94b01da1461011457600080fd5b806326126d461461008d57806359db5bf7146100a257806386517341146100b5578063869dc021146100c8575b600080fd5b6100a061009b366004610852565b610127565b005b6100a06100b0366004610852565b610140565b6100a06100c3366004610852565b61015c565b6100a06100d636600461086b565b61021c565b6100a06100e9366004610852565b610385565b6100a06100fc366004610852565b61041b565b6100a061010f366004610852565b6104d6565b6100a0610122366004610852565b61056c565b61012f610606565b60006101396106d1565b9190915550565b610148610606565b60006101526106d1565b6002019190915550565b610164610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90821015610216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e64730000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60010155565b610224610606565b73ffffffffffffffffffffffffffffffffffffffff81166102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b6102cb817fd9b67a26000000000000000000000000000000000000000000000000000000006106fc565b610331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e67616464726573730000000000000000000000000000000000000000604482015260640161020d565b600061033b6106d1565b60040180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915550565b61038d610606565b806000036103f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3055565b610423610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908211156104d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e647300000000000000000000000000000000000000000000604482015260640161020d565b60020155565b6104de610606565b80600003610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3155565b610574610606565b806000036105de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d610139565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840161020d565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b60006107078361071f565b801561071857506107188383610783565b9392505050565b600061074b827f01ffc9a700000000000000000000000000000000000000000000000000000000610783565b80156106f6575061077c827fffffffff00000000000000000000000000000000000000000000000000000000610783565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d9150600051905082801561083b575060208210155b80156108475750600081115b979650505050505050565b60006020828403121561086457600080fd5b5035919050565b60006020828403121561087d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461071857600080fdfea2646970667358221220dd6d4ce85ef65261b687c3cfbfeb830cef4f51d003d586c71df705dc0b34236f64736f6c63430008140033", + "numDeployments": 1, + "solcInputHash": "950621027b9d5cffdabde867c6602559", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"setGamePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"setJoinGamePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxPlayersSize\",\"type\":\"uint256\"}],\"name\":\"setMaxPlayersSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxTurns\",\"type\":\"uint256\"}],\"name\":\"setMaxTurns\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMinPlayersSize\",\"type\":\"uint256\"}],\"name\":\"setMinPlayersSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRankToken\",\"type\":\"address\"}],\"name\":\"setRankTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newTimePerTurn\",\"type\":\"uint256\"}],\"name\":\"setTimePerTurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newTimeToJoin\",\"type\":\"uint256\"}],\"name\":\"setTimeToJoin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"setGamePrice(uint256)\":{\"details\":\"Sets the game price. `newPrice` is the new game price. Modifies: - Sets the game price to `newPrice`. Requirements: - The caller must be the contract owner.\"},\"setJoinGamePrice(uint256)\":{\"details\":\"Sets the join game price. `newPrice` is the new join game price. Modifies: - Sets the join game price to `newPrice`. Requirements: - The caller must be the contract owner.\"},\"setMaxPlayersSize(uint256)\":{\"details\":\"Sets the maximum number of players in a game. `newMaxPlayersSize` is the new maximum number of players. Modifies: - Sets the maximum number of players to `newMaxPlayersSize`. Requirements: - The caller must be the contract owner. - `newMaxPlayersSize` must be greater than or equal to the minimum number of players.\"},\"setMaxTurns(uint256)\":{\"details\":\"Sets the maximum number of turns in a game. `newMaxTurns` is the new maximum number of turns. Modifies: - Sets the maximum number of turns to `newMaxTurns`. Requirements: - The caller must be the contract owner. - `newMaxTurns` must not be zero.\"},\"setMinPlayersSize(uint256)\":{\"details\":\"Sets the minimum number of players in a game. `newMinPlayersSize` is the new minimum number of players. Modifies: - Sets the minimum number of players to `newMinPlayersSize`. Requirements: - The caller must be the contract owner. - `newMinPlayersSize` must be less than or equal to the maximum number of players.\"},\"setRankTokenAddress(address)\":{\"details\":\"Sets the rank token address. `newRankToken` is the new rank token address. Modifies: - Sets the rank token address to `newRankToken`. Requirements: - The caller must be the contract owner. - `newRankToken` must not be the zero address. - `newRankToken` must support the ERC1155 interface.\"},\"setTimePerTurn(uint256)\":{\"details\":\"Sets the time per turn. `newTimePerTurn` is the new time per turn. Modifies: - Sets the time per turn to `newTimePerTurn`. Requirements: - The caller must be the contract owner.\"},\"setTimeToJoin(uint256)\":{\"details\":\"Sets the time to join a game. `newTimeToJoin` is the new time to join. Modifies: - Sets the time to join to `newTimeToJoin`. Requirements: - The caller must be the contract owner. - `newTimeToJoin` must not be zero.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceGameOwnersFacet.sol\":\"RankifyInstanceGameOwnersFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceGameOwnersFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\n\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\n\\nerror ZeroValue();\\nerror WrongAddress();\\nerror OutOfBounds();\\n\\ncontract RankifyInstanceGameOwnersFacet {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n /**\\n * @dev Sets the game price. `newPrice` is the new game price.\\n *\\n * Modifies:\\n *\\n * - Sets the game price to `newPrice`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setGamePrice(uint256 newPrice) external {\\n LibDiamond.enforceIsContractOwner();\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.gamePrice = newPrice;\\n }\\n\\n /**\\n * @dev Sets the join game price. `newPrice` is the new join game price.\\n *\\n * Modifies:\\n *\\n * - Sets the join game price to `newPrice`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setJoinGamePrice(uint256 newPrice) external {\\n LibDiamond.enforceIsContractOwner();\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.joinGamePrice = newPrice;\\n }\\n\\n /**\\n * @dev Sets the rank token address. `newRankToken` is the new rank token address.\\n *\\n * Modifies:\\n *\\n * - Sets the rank token address to `newRankToken`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newRankToken` must not be the zero address.\\n * - `newRankToken` must support the ERC1155 interface.\\n */\\n function setRankTokenAddress(address newRankToken) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newRankToken == address(0)) {\\n require(false, \\\"zerovalue\\\"); //revert ZeroValue();\\n }\\n if (!ERC165Checker.supportsInterface(newRankToken, type(IERC1155).interfaceId)) {\\n require(false, \\\"wrongaddress\\\"); //revert WrongAddress();\\n }\\n\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.rankTokenAddress = newRankToken;\\n }\\n\\n /**\\n * @dev Sets the time per turn. `newTimePerTurn` is the new time per turn.\\n *\\n * Modifies:\\n *\\n * - Sets the time per turn to `newTimePerTurn`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n */\\n function setTimePerTurn(uint256 newTimePerTurn) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newTimePerTurn == 0) {\\n require(false, \\\"zerovalue\\\"); // revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.timePerTurn = newTimePerTurn;\\n }\\n\\n /**\\n * @dev Sets the maximum number of players in a game. `newMaxPlayersSize` is the new maximum number of players.\\n *\\n * Modifies:\\n *\\n * - Sets the maximum number of players to `newMaxPlayersSize`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMaxPlayersSize` must be greater than or equal to the minimum number of players.\\n */\\n function setMaxPlayersSize(uint256 newMaxPlayersSize) external {\\n LibDiamond.enforceIsContractOwner();\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n if (newMaxPlayersSize < tbg.settings.minPlayersSize) {\\n require(false, \\\"outofbonds\\\"); // revert OutOfBounds();\\n }\\n tbg.settings.maxPlayersSize = newMaxPlayersSize;\\n }\\n\\n /**\\n * @dev Sets the minimum number of players in a game. `newMinPlayersSize` is the new minimum number of players.\\n *\\n * Modifies:\\n *\\n * - Sets the minimum number of players to `newMinPlayersSize`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMinPlayersSize` must be less than or equal to the maximum number of players.\\n */\\n function setMinPlayersSize(uint256 newMinPlayersSize) external {\\n LibDiamond.enforceIsContractOwner();\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n if (newMinPlayersSize > tbg.settings.maxPlayersSize) {\\n require(false, \\\"outofbonds\\\"); // revert OutOfBounds();\\n }\\n tbg.settings.minPlayersSize = newMinPlayersSize;\\n }\\n\\n /**\\n * @dev Sets the time to join a game. `newTimeToJoin` is the new time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the time to join to `newTimeToJoin`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newTimeToJoin` must not be zero.\\n */\\n function setTimeToJoin(uint256 newTimeToJoin) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newTimeToJoin == 0) {\\n require(false, \\\"ZeroValue\\\"); //revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.timeToJoin = newTimeToJoin;\\n }\\n\\n /**\\n * @dev Sets the maximum number of turns in a game. `newMaxTurns` is the new maximum number of turns.\\n *\\n * Modifies:\\n *\\n * - Sets the maximum number of turns to `newMaxTurns`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the contract owner.\\n * - `newMaxTurns` must not be zero.\\n */\\n function setMaxTurns(uint256 newMaxTurns) external {\\n LibDiamond.enforceIsContractOwner();\\n if (newMaxTurns == 0) {\\n require(false, \\\"ZeroValue\\\"); // revert ZeroValue();\\n }\\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\\n tbg.settings.maxTurns = newMaxTurns;\\n }\\n}\\n\",\"keccak256\":\"0x0b06fa4d031fa95852ef8c0013a0ae2e709106bee6f0c7151ddbacb1cac82deb\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x9e5c01321d4e1f9102bd4638b5fc168a3aecae7d04de267838ca04848bebd81a\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506108d7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063911f8e1b1161005b578063911f8e1b146100db578063924b5bb1146100ee578063966fb1ea14610101578063c94b01da1461011457600080fd5b806326126d461461008d57806359db5bf7146100a257806386517341146100b5578063869dc021146100c8575b600080fd5b6100a061009b366004610852565b610127565b005b6100a06100b0366004610852565b610140565b6100a06100c3366004610852565b61015c565b6100a06100d636600461086b565b61021c565b6100a06100e9366004610852565b610385565b6100a06100fc366004610852565b61041b565b6100a061010f366004610852565b6104d6565b6100a0610122366004610852565b61056c565b61012f610606565b60006101396106d1565b9190915550565b610148610606565b60006101526106d1565b6002019190915550565b610164610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90821015610216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e64730000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60010155565b610224610606565b73ffffffffffffffffffffffffffffffffffffffff81166102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b6102cb817fd9b67a26000000000000000000000000000000000000000000000000000000006106fc565b610331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e67616464726573730000000000000000000000000000000000000000604482015260640161020d565b600061033b6106d1565b60040180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915550565b61038d610606565b806000036103f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3055565b610423610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908211156104d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e647300000000000000000000000000000000000000000000604482015260640161020d565b60020155565b6104de610606565b80600003610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3155565b610574610606565b806000036105de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d610139565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840161020d565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b60006107078361071f565b801561071857506107188383610783565b9392505050565b600061074b827f01ffc9a700000000000000000000000000000000000000000000000000000000610783565b80156106f6575061077c827fffffffff00000000000000000000000000000000000000000000000000000000610783565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d9150600051905082801561083b575060208210155b80156108475750600081115b979650505050505050565b60006020828403121561086457600080fd5b5035919050565b60006020828403121561087d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461071857600080fdfea26469706673582212209ab2113aa5dc0b01a86a344bec5a59e97096d66f1d067ebcef2a6556e645706764736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063911f8e1b1161005b578063911f8e1b146100db578063924b5bb1146100ee578063966fb1ea14610101578063c94b01da1461011457600080fd5b806326126d461461008d57806359db5bf7146100a257806386517341146100b5578063869dc021146100c8575b600080fd5b6100a061009b366004610852565b610127565b005b6100a06100b0366004610852565b610140565b6100a06100c3366004610852565b61015c565b6100a06100d636600461086b565b61021c565b6100a06100e9366004610852565b610385565b6100a06100fc366004610852565b61041b565b6100a061010f366004610852565b6104d6565b6100a0610122366004610852565b61056c565b61012f610606565b60006101396106d1565b9190915550565b610148610606565b60006101526106d1565b6002019190915550565b610164610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90821015610216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e64730000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60010155565b610224610606565b73ffffffffffffffffffffffffffffffffffffffff81166102a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b6102cb817fd9b67a26000000000000000000000000000000000000000000000000000000006106fc565b610331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e67616464726573730000000000000000000000000000000000000000604482015260640161020d565b600061033b6106d1565b60040180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915550565b61038d610606565b806000036103f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3055565b610423610606565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908211156104d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f75746f66626f6e647300000000000000000000000000000000000000000000604482015260640161020d565b60020155565b6104de610606565b80600003610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f5a65726f56616c75650000000000000000000000000000000000000000000000604482015260640161020d565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3155565b610574610606565b806000036105de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f7a65726f76616c75650000000000000000000000000000000000000000000000604482015260640161020d565b60007f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d610139565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840161020d565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b60006107078361071f565b801561071857506107188383610783565b9392505050565b600061074b827f01ffc9a700000000000000000000000000000000000000000000000000000000610783565b80156106f6575061077c827fffffffff00000000000000000000000000000000000000000000000000000000610783565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d9150600051905082801561083b575060208210155b80156108475750600081115b979650505050505050565b60006020828403121561086457600080fd5b5035919050565b60006020828403121561087d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461071857600080fdfea26469706673582212209ab2113aa5dc0b01a86a344bec5a59e97096d66f1d067ebcef2a6556e645706764736f6c63430008140033", "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/anvil/RankifyInstanceInit.json b/deployments/anvil/RankifyInstanceInit.json index e68eba0..9643788 100644 --- a/deployments/anvil/RankifyInstanceInit.json +++ b/deployments/anvil/RankifyInstanceInit.json @@ -1,5 +1,5 @@ { - "address": "0x19c7EDBc192a18161161906AD6b1FbEf3C4Ca43E", + "address": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", "abi": [ { "inputs": [ @@ -87,28 +87,28 @@ "type": "function" } ], - "transactionHash": "0x7a7c284698c8d852db9ad922e3569fab3f9b4d118a9a8ab98acb79f4fbd25aee", + "transactionHash": "0xb1d8a06910b681b2a85488ace0346cabdc07225ff1d9bd675203a53af0d424e1", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", - "from": "0x507c2d32185667156de5B4C440FEEf3800078bDb", + "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", "contractAddress": null, "transactionIndex": 0, "gasUsed": "1178619", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0730726d2ef2c71bd6a0350c994a0392808687711fed2da742e02e64a724fd0c", - "transactionHash": "0x7a7c284698c8d852db9ad922e3569fab3f9b4d118a9a8ab98acb79f4fbd25aee", + "blockHash": "0x449f98b70660e5d0d1d441a37470784ee80e73dbfe386e18c2590833cdf09f9d", + "transactionHash": "0xb1d8a06910b681b2a85488ace0346cabdc07225ff1d9bd675203a53af0d424e1", "logs": [], - "blockNumber": 407, + "blockNumber": 492, "cumulativeGasUsed": "1178619", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "af20401871b7f4e560e69ce739339e01", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timePerTurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rankTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeToJoin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"joinGamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTurns\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numWinners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"subject\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"rankifyToken\",\"type\":\"address\"}],\"internalType\":\"struct RankifyInstanceInit.contractInitializer\",\"name\":\"initializer\",\"type\":\"tuple\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/initializers/RankifyInstanceInit.sol\":\"RankifyInstanceInit\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/initializers/RankifyInstanceInit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n*\\n* Implementation of a diamond.\\n/******************************************************************************/\\n\\nimport {LibDiamond} from \\\"../vendor/libraries/LibDiamond.sol\\\";\\nimport {IDiamondLoupe} from \\\"../vendor/interfaces/IDiamondLoupe.sol\\\";\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\nimport {IERC173} from \\\"../vendor/interfaces/IERC173.sol\\\";\\nimport {IERC165} from \\\"../vendor/interfaces/IERC165.sol\\\";\\nimport {LibEIP712WithStorage} from \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n// import {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n// It is expected that this contract is customized if you want to deploy your diamond\\n// with data from a deployment script. Use the init function to initialize state variables\\n// of your diamond. Add parameters to the init funciton if you need to.\\n\\ncontract RankifyInstanceInit {\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n struct contractInitializer {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n address rankTokenAddress;\\n uint256 timeToJoin;\\n uint256 gamePrice;\\n uint256 joinGamePrice;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n address rankifyToken;\\n }\\n\\n // You can add parameters to this function in order to pass in\\n // data to set your own state variables\\n function init(string memory name, string memory version, contractInitializer memory initializer) external {\\n // adding ERC165 data\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n ds.supportedInterfaces[type(IERC165).interfaceId] = true;\\n ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true;\\n ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true;\\n ds.supportedInterfaces[type(IERC173).interfaceId] = true;\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n ss._HASHED_NAME = hashedName;\\n ss._HASHED_VERSION = hashedVersion;\\n ss._CACHED_CHAIN_ID = block.chainid;\\n ss._CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n ss._CACHED_THIS = address(this);\\n ss._TYPE_HASH = typeHash;\\n\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.voting = LibQuadraticVoting.precomputeValues(initializer.voteCredits, initializer.minPlayersSize);\\n _RInstance.gamePrice = initializer.gamePrice;\\n _RInstance.joinGamePrice = initializer.joinGamePrice;\\n require(initializer.rankifyToken != address(0), \\\"initializer.rankifyToken not set\\\");\\n _RInstance.gamePaymentToken = initializer.rankifyToken;\\n IRankToken rankContract = IRankToken(initializer.rankTokenAddress);\\n require(\\n rankContract.supportsInterface(type(IRankToken).interfaceId),\\n \\\"RankifyInstance->init: rank token address does not support Rank interface\\\"\\n );\\n _RInstance.rankTokenAddress = initializer.rankTokenAddress;\\n _RInstance.contractInitialized = true;\\n\\n LibTBG.GameSettings memory settings;\\n settings.timePerTurn = initializer.timePerTurn;\\n settings.maxPlayersSize = initializer.maxPlayersSize;\\n settings.minPlayersSize = initializer.minPlayersSize;\\n settings.timeToJoin = initializer.timeToJoin;\\n settings.maxTurns = initializer.maxTurns;\\n settings.numWinners = initializer.numWinners;\\n settings.subject = initializer.subject;\\n LibTBG.init(settings);\\n\\n // add your own state variables\\n // EIP-2535 specifies that the `diamondCut` function takes two optional\\n // arguments: address _init and bytes calldata _calldata\\n // These arguments are used to execute an arbitrary function using delegatecall\\n // in order to set state variables in the diamond during deployment or an upgrade\\n // More info here: https://eips.ethereum.org/EIPS/eip-2535#diamond-interface\\n }\\n}\\n\",\"keccak256\":\"0x94dae73cd59b6d4dc414e54c479a20780dd7a0b7be437014b79b71753f9a4ff8\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * ***WARNING*** This function is unused in the current implementation of the library.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x01cc4615c50c7ab606c54ea358f57db5fd6273518983a5659b21edc771aaa037\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n// A loupe is a small magnifying glass used to look at diamonds.\\n// These functions look at diamonds\\ninterface IDiamondLoupe {\\n /// These functions are expected to be called frequently\\n /// by tools.\\n\\n struct Facet {\\n address facetAddress;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0x5ce5cb670c85bea71036f7ce3513c9cf3df88d7f6fcfe8fbe74f8290be36a3cc\",\"license\":\"MIT\"},\"src/vendor/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceId The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0162f02752820fae5095e759db636e567ce9a128dd470e5b675a230a91f449c9\",\"license\":\"MIT\"},\"src/vendor/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/// @title ERC-173 Contract Ownership Standard\\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\\n/* is ERC165 */\\ninterface IERC173 {\\n /// @dev This emits when ownership of a contract changes.\\n // Removed deue to duplicate abi generation in 8.20 compiler\\n // event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @dev Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x8fd517ec0fdb014cb7d32a0b46894899e7e1113dba0e62d1b85c492a3c70a2c0\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061147b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631e77abbc14610030575b600080fd5b61004361003e366004610f51565b610045565b005b61004d610624565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f60209081527f699d9daa71b280d05a152715774afa0a81a312594b2d731d6b0b2552b7d6f69f805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821681179092557ff97e938d8af42f52387bb74b8b526fda8f184cc2aa534340a8d75a88fbecc77580548216831790557f65d510a5d8f7ef134ec444f7f34ee808c8eeb5177cdfd16be0c40fe1ab43369580548216831790557f7f5828d0000000000000000000000000000000000000000000000000000000006000527f5622121b47b8cd0120c4efe45dd5483242f54a3d49bd7679be565d47694918c3805490911690911790558351848201208351848301207fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3aa8290557fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3ab819055467fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a8819055604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187018190528183018690526060820185905260808201939093523060a0808301919091528251808303909101815260c090910190915280519401939093207fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93907fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a79081556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016301790556005810182905560006102c36106ef565b90506102d8876101200151886040015161071a565b805160058301556020810151600683015560400151600782015560a0870151815560c0870151600282015561016087015173ffffffffffffffffffffffffffffffffffffffff1661038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e697469616c697a65722e72616e6b696679546f6b656e206e6f742073657460448201526064015b60405180910390fd5b6101608701516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560608801516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290918216906301ffc9a790602401602060405180830381865afa15801561044f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610473919061108f565b610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f52616e6b696679496e7374616e63652d3e696e69743a2072616e6b20746f6b6560448201527f6e206164647265737320646f6573206e6f7420737570706f72742052616e6b2060648201527f696e746572666163650000000000000000000000000000000000000000000000608482015260a401610381565b6060808901516004840180547fffffffffffffffffffffff0000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091177401000000000000000000000000000000000000000017905560408051610100810182526000808252602082018190529181018290528083018290526080810182905260a0810182905260c081019190915260e0810191909152885181526020808a0151908201526040808a0151908201526080808a0151606083015260e0808b0151918301919091526101008a015160a08301526101408a01519082015261061781610885565b5050505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610381565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b61073e60405180606001604052806000815260200160008152602001600081525090565b61076260405180606001604052806000815260200160008152602001600081525090565b61076b84610c8b565b60208201526000805b8161077e816110e0565b925061078d9050600283611238565b6107979082611247565b905085811061077457858114610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b60408301829052818511610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b50509283525090919050565b80517f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90600003610912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f73657474696e67732e74696d655065725475726e0000000000000000000000006044820152606401610381565b8160200151600003610980576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d6178506c617965727353697a650000000000000000006044820152606401610381565b6002826040015110156109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d696e506c617965727353697a650000000000000000006044820152606401610381565b8160800151600003610a5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f73657474696e67732e6d61785475726e730000000000000000000000000000006044820152606401610381565b60a08201511580610a76575081604001518260a0015110155b15610add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e756d57696e6e657273000000000000000000000000000000000000000000006044820152606401610381565b8160600151600003610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f74696d65546f4a6f696e000000000000000000000000000000000000000000006044820152606401610381565b816040015182602001511015610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6d6178506c617965727353697a650000000000000000000000000000000000006044820152606401610381565b8160e0015151600003610c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7375626a656374206c656e6774680000000000000000000000000000000000006044820152606401610381565b815181556020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151829082906007820190610c8490826112fc565b5050505050565b600081600003610c9d57506000919050565b60006001610caa84610d7a565b901c6001901b90506001818481610cc357610cc3611416565b048201901c90506001818481610cdb57610cdb611416565b048201901c90506001818481610cf357610cf3611416565b048201901c90506001818481610d0b57610d0b611416565b048201901c90506001818481610d2357610d23611416565b048201901c90506001818481610d3b57610d3b611416565b048201901c90506001818481610d5357610d53611416565b048201901c9050610d7381828581610d6d57610d6d611416565b04610e0e565b9392505050565b600080608083901c15610d8f57608092831c92015b604083901c15610da157604092831c92015b602083901c15610db357602092831c92015b601083901c15610dc557601092831c92015b600883901c15610dd757600892831c92015b600483901c15610de957600492831c92015b600283901c15610dfb57600292831c92015b600183901c156107145760010192915050565b6000818310610e1d5781610d73565b5090919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715610e7757610e77610e24565b60405290565b600082601f830112610e8e57600080fd5b813567ffffffffffffffff80821115610ea957610ea9610e24565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610eef57610eef610e24565b81604052838152866020858801011115610f0857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f4c57600080fd5b919050565b600080600060608486031215610f6657600080fd5b833567ffffffffffffffff80821115610f7e57600080fd5b610f8a87838801610e7d565b94506020860135915080821115610fa057600080fd5b610fac87838801610e7d565b93506040860135915080821115610fc257600080fd5b908501906101808288031215610fd757600080fd5b610fdf610e53565b82358152602083013560208201526040830135604082015261100360608401610f28565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358381111561105c57600080fd5b6110688a828701610e7d565b828401525050610160915061107e828401610f28565b828201528093505050509250925092565b6000602082840312156110a157600080fd5b81518015158114610d7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611111576111116110b1565b5060010190565b600181815b8085111561117157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611157576111576110b1565b8085161561116457918102915b93841c939080029061111d565b509250929050565b60008261118857506001610714565b8161119557506000610714565b81600181146111ab57600281146111b5576111d1565b6001915050610714565b60ff8411156111c6576111c66110b1565b50506001821b610714565b5060208310610133831016604e8410600b84101617156111f4575081810a610714565b6111fe8383611118565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611230576112306110b1565b029392505050565b6000610d7360ff841683611179565b80820180821115610714576107146110b1565b600181811c9082168061126e57607f821691505b6020821081036112a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156112f757600081815260208120601f850160051c810160208610156112d45750805b601f850160051c820191505b818110156112f3578281556001016112e0565b5050505b505050565b815167ffffffffffffffff81111561131657611316610e24565b61132a81611324845461125a565b846112ad565b602080601f83116001811461137d57600084156113475750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112f3565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113ca578886015182559484019460019091019084016113ab565b508582101561140657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f1c899c0d49aeddbebefedd3e2b04bdf1a0aaf4bd1425c4ff7db7c6cd496b4a164736f6c63430008140033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631e77abbc14610030575b600080fd5b61004361003e366004610f51565b610045565b005b61004d610624565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f60209081527f699d9daa71b280d05a152715774afa0a81a312594b2d731d6b0b2552b7d6f69f805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821681179092557ff97e938d8af42f52387bb74b8b526fda8f184cc2aa534340a8d75a88fbecc77580548216831790557f65d510a5d8f7ef134ec444f7f34ee808c8eeb5177cdfd16be0c40fe1ab43369580548216831790557f7f5828d0000000000000000000000000000000000000000000000000000000006000527f5622121b47b8cd0120c4efe45dd5483242f54a3d49bd7679be565d47694918c3805490911690911790558351848201208351848301207fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3aa8290557fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3ab819055467fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a8819055604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187018190528183018690526060820185905260808201939093523060a0808301919091528251808303909101815260c090910190915280519401939093207fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93907fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a79081556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016301790556005810182905560006102c36106ef565b90506102d8876101200151886040015161071a565b805160058301556020810151600683015560400151600782015560a0870151815560c0870151600282015561016087015173ffffffffffffffffffffffffffffffffffffffff1661038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e697469616c697a65722e72616e6b696679546f6b656e206e6f742073657460448201526064015b60405180910390fd5b6101608701516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560608801516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290918216906301ffc9a790602401602060405180830381865afa15801561044f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610473919061108f565b610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f52616e6b696679496e7374616e63652d3e696e69743a2072616e6b20746f6b6560448201527f6e206164647265737320646f6573206e6f7420737570706f72742052616e6b2060648201527f696e746572666163650000000000000000000000000000000000000000000000608482015260a401610381565b6060808901516004840180547fffffffffffffffffffffff0000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091177401000000000000000000000000000000000000000017905560408051610100810182526000808252602082018190529181018290528083018290526080810182905260a0810182905260c081019190915260e0810191909152885181526020808a0151908201526040808a0151908201526080808a0151606083015260e0808b0151918301919091526101008a015160a08301526101408a01519082015261061781610885565b5050505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610381565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b61073e60405180606001604052806000815260200160008152602001600081525090565b61076260405180606001604052806000815260200160008152602001600081525090565b61076b84610c8b565b60208201526000805b8161077e816110e0565b925061078d9050600283611238565b6107979082611247565b905085811061077457858114610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b60408301829052818511610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b50509283525090919050565b80517f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90600003610912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f73657474696e67732e74696d655065725475726e0000000000000000000000006044820152606401610381565b8160200151600003610980576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d6178506c617965727353697a650000000000000000006044820152606401610381565b6002826040015110156109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d696e506c617965727353697a650000000000000000006044820152606401610381565b8160800151600003610a5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f73657474696e67732e6d61785475726e730000000000000000000000000000006044820152606401610381565b60a08201511580610a76575081604001518260a0015110155b15610add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e756d57696e6e657273000000000000000000000000000000000000000000006044820152606401610381565b8160600151600003610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f74696d65546f4a6f696e000000000000000000000000000000000000000000006044820152606401610381565b816040015182602001511015610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6d6178506c617965727353697a650000000000000000000000000000000000006044820152606401610381565b8160e0015151600003610c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7375626a656374206c656e6774680000000000000000000000000000000000006044820152606401610381565b815181556020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151829082906007820190610c8490826112fc565b5050505050565b600081600003610c9d57506000919050565b60006001610caa84610d7a565b901c6001901b90506001818481610cc357610cc3611416565b048201901c90506001818481610cdb57610cdb611416565b048201901c90506001818481610cf357610cf3611416565b048201901c90506001818481610d0b57610d0b611416565b048201901c90506001818481610d2357610d23611416565b048201901c90506001818481610d3b57610d3b611416565b048201901c90506001818481610d5357610d53611416565b048201901c9050610d7381828581610d6d57610d6d611416565b04610e0e565b9392505050565b600080608083901c15610d8f57608092831c92015b604083901c15610da157604092831c92015b602083901c15610db357602092831c92015b601083901c15610dc557601092831c92015b600883901c15610dd757600892831c92015b600483901c15610de957600492831c92015b600283901c15610dfb57600292831c92015b600183901c156107145760010192915050565b6000818310610e1d5781610d73565b5090919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715610e7757610e77610e24565b60405290565b600082601f830112610e8e57600080fd5b813567ffffffffffffffff80821115610ea957610ea9610e24565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610eef57610eef610e24565b81604052838152866020858801011115610f0857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f4c57600080fd5b919050565b600080600060608486031215610f6657600080fd5b833567ffffffffffffffff80821115610f7e57600080fd5b610f8a87838801610e7d565b94506020860135915080821115610fa057600080fd5b610fac87838801610e7d565b93506040860135915080821115610fc257600080fd5b908501906101808288031215610fd757600080fd5b610fdf610e53565b82358152602083013560208201526040830135604082015261100360608401610f28565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358381111561105c57600080fd5b6110688a828701610e7d565b828401525050610160915061107e828401610f28565b828201528093505050509250925092565b6000602082840312156110a157600080fd5b81518015158114610d7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611111576111116110b1565b5060010190565b600181815b8085111561117157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611157576111576110b1565b8085161561116457918102915b93841c939080029061111d565b509250929050565b60008261118857506001610714565b8161119557506000610714565b81600181146111ab57600281146111b5576111d1565b6001915050610714565b60ff8411156111c6576111c66110b1565b50506001821b610714565b5060208310610133831016604e8410600b84101617156111f4575081810a610714565b6111fe8383611118565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611230576112306110b1565b029392505050565b6000610d7360ff841683611179565b80820180821115610714576107146110b1565b600181811c9082168061126e57607f821691505b6020821081036112a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156112f757600081815260208120601f850160051c810160208610156112d45750805b601f850160051c820191505b818110156112f3578281556001016112e0565b5050505b505050565b815167ffffffffffffffff81111561131657611316610e24565b61132a81611324845461125a565b846112ad565b602080601f83116001811461137d57600084156113475750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112f3565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113ca578886015182559484019460019091019084016113ab565b508582101561140657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f1c899c0d49aeddbebefedd3e2b04bdf1a0aaf4bd1425c4ff7db7c6cd496b4a164736f6c63430008140033", + "numDeployments": 1, + "solcInputHash": "950621027b9d5cffdabde867c6602559", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timePerTurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rankTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeToJoin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"joinGamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTurns\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numWinners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"subject\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"rankifyToken\",\"type\":\"address\"}],\"internalType\":\"struct RankifyInstanceInit.contractInitializer\",\"name\":\"initializer\",\"type\":\"tuple\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/initializers/RankifyInstanceInit.sol\":\"RankifyInstanceInit\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/initializers/RankifyInstanceInit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\\n*\\n* Implementation of a diamond.\\n/******************************************************************************/\\n\\nimport {LibDiamond} from \\\"../vendor/libraries/LibDiamond.sol\\\";\\nimport {IDiamondLoupe} from \\\"../vendor/interfaces/IDiamondLoupe.sol\\\";\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\nimport {IERC173} from \\\"../vendor/interfaces/IERC173.sol\\\";\\nimport {IERC165} from \\\"../vendor/interfaces/IERC165.sol\\\";\\nimport {LibEIP712WithStorage} from \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n// import {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\n// It is expected that this contract is customized if you want to deploy your diamond\\n// with data from a deployment script. Use the init function to initialize state variables\\n// of your diamond. Add parameters to the init funciton if you need to.\\n\\ncontract RankifyInstanceInit {\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n struct contractInitializer {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n address rankTokenAddress;\\n uint256 timeToJoin;\\n uint256 gamePrice;\\n uint256 joinGamePrice;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n address rankifyToken;\\n }\\n\\n // You can add parameters to this function in order to pass in\\n // data to set your own state variables\\n function init(string memory name, string memory version, contractInitializer memory initializer) external {\\n // adding ERC165 data\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n ds.supportedInterfaces[type(IERC165).interfaceId] = true;\\n ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true;\\n ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true;\\n ds.supportedInterfaces[type(IERC173).interfaceId] = true;\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n ss._HASHED_NAME = hashedName;\\n ss._HASHED_VERSION = hashedVersion;\\n ss._CACHED_CHAIN_ID = block.chainid;\\n ss._CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n ss._CACHED_THIS = address(this);\\n ss._TYPE_HASH = typeHash;\\n\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n _RInstance.voting = LibQuadraticVoting.precomputeValues(initializer.voteCredits, initializer.minPlayersSize);\\n _RInstance.gamePrice = initializer.gamePrice;\\n _RInstance.joinGamePrice = initializer.joinGamePrice;\\n require(initializer.rankifyToken != address(0), \\\"initializer.rankifyToken not set\\\");\\n _RInstance.gamePaymentToken = initializer.rankifyToken;\\n IRankToken rankContract = IRankToken(initializer.rankTokenAddress);\\n require(\\n rankContract.supportsInterface(type(IRankToken).interfaceId),\\n \\\"RankifyInstance->init: rank token address does not support Rank interface\\\"\\n );\\n _RInstance.rankTokenAddress = initializer.rankTokenAddress;\\n _RInstance.contractInitialized = true;\\n\\n LibTBG.GameSettings memory settings;\\n settings.timePerTurn = initializer.timePerTurn;\\n settings.maxPlayersSize = initializer.maxPlayersSize;\\n settings.minPlayersSize = initializer.minPlayersSize;\\n settings.timeToJoin = initializer.timeToJoin;\\n settings.maxTurns = initializer.maxTurns;\\n settings.numWinners = initializer.numWinners;\\n settings.subject = initializer.subject;\\n LibTBG.init(settings);\\n\\n // add your own state variables\\n // EIP-2535 specifies that the `diamondCut` function takes two optional\\n // arguments: address _init and bytes calldata _calldata\\n // These arguments are used to execute an arbitrary function using delegatecall\\n // in order to set state variables in the diamond during deployment or an upgrade\\n // More info here: https://eips.ethereum.org/EIPS/eip-2535#diamond-interface\\n }\\n}\\n\",\"keccak256\":\"0x94dae73cd59b6d4dc414e54c479a20780dd7a0b7be437014b79b71753f9a4ff8\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x9e5c01321d4e1f9102bd4638b5fc168a3aecae7d04de267838ca04848bebd81a\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\n// A loupe is a small magnifying glass used to look at diamonds.\\n// These functions look at diamonds\\ninterface IDiamondLoupe {\\n /// These functions are expected to be called frequently\\n /// by tools.\\n\\n struct Facet {\\n address facetAddress;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0x5ce5cb670c85bea71036f7ce3513c9cf3df88d7f6fcfe8fbe74f8290be36a3cc\",\"license\":\"MIT\"},\"src/vendor/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceId The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0162f02752820fae5095e759db636e567ce9a128dd470e5b675a230a91f449c9\",\"license\":\"MIT\"},\"src/vendor/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/// @title ERC-173 Contract Ownership Standard\\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\\n/* is ERC165 */\\ninterface IERC173 {\\n /// @dev This emits when ownership of a contract changes.\\n // Removed deue to duplicate abi generation in 8.20 compiler\\n // event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @dev Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0x8fd517ec0fdb014cb7d32a0b46894899e7e1113dba0e62d1b85c492a3c70a2c0\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061147b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631e77abbc14610030575b600080fd5b61004361003e366004610f51565b610045565b005b61004d610624565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f60209081527f699d9daa71b280d05a152715774afa0a81a312594b2d731d6b0b2552b7d6f69f805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821681179092557ff97e938d8af42f52387bb74b8b526fda8f184cc2aa534340a8d75a88fbecc77580548216831790557f65d510a5d8f7ef134ec444f7f34ee808c8eeb5177cdfd16be0c40fe1ab43369580548216831790557f7f5828d0000000000000000000000000000000000000000000000000000000006000527f5622121b47b8cd0120c4efe45dd5483242f54a3d49bd7679be565d47694918c3805490911690911790558351848201208351848301207fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3aa8290557fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3ab819055467fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a8819055604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187018190528183018690526060820185905260808201939093523060a0808301919091528251808303909101815260c090910190915280519401939093207fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93907fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a79081556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016301790556005810182905560006102c36106ef565b90506102d8876101200151886040015161071a565b805160058301556020810151600683015560400151600782015560a0870151815560c0870151600282015561016087015173ffffffffffffffffffffffffffffffffffffffff1661038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e697469616c697a65722e72616e6b696679546f6b656e206e6f742073657460448201526064015b60405180910390fd5b6101608701516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560608801516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290918216906301ffc9a790602401602060405180830381865afa15801561044f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610473919061108f565b610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f52616e6b696679496e7374616e63652d3e696e69743a2072616e6b20746f6b6560448201527f6e206164647265737320646f6573206e6f7420737570706f72742052616e6b2060648201527f696e746572666163650000000000000000000000000000000000000000000000608482015260a401610381565b6060808901516004840180547fffffffffffffffffffffff0000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091177401000000000000000000000000000000000000000017905560408051610100810182526000808252602082018190529181018290528083018290526080810182905260a0810182905260c081019190915260e0810191909152885181526020808a0151908201526040808a0151908201526080808a0151606083015260e0808b0151918301919091526101008a015160a08301526101408a01519082015261061781610885565b5050505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610381565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b61073e60405180606001604052806000815260200160008152602001600081525090565b61076260405180606001604052806000815260200160008152602001600081525090565b61076b84610c8b565b60208201526000805b8161077e816110e0565b925061078d9050600283611238565b6107979082611247565b905085811061077457858114610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b60408301829052818511610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b50509283525090919050565b80517f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90600003610912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f73657474696e67732e74696d655065725475726e0000000000000000000000006044820152606401610381565b8160200151600003610980576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d6178506c617965727353697a650000000000000000006044820152606401610381565b6002826040015110156109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d696e506c617965727353697a650000000000000000006044820152606401610381565b8160800151600003610a5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f73657474696e67732e6d61785475726e730000000000000000000000000000006044820152606401610381565b60a08201511580610a76575081604001518260a0015110155b15610add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e756d57696e6e657273000000000000000000000000000000000000000000006044820152606401610381565b8160600151600003610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f74696d65546f4a6f696e000000000000000000000000000000000000000000006044820152606401610381565b816040015182602001511015610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6d6178506c617965727353697a650000000000000000000000000000000000006044820152606401610381565b8160e0015151600003610c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7375626a656374206c656e6774680000000000000000000000000000000000006044820152606401610381565b815181556020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151829082906007820190610c8490826112fc565b5050505050565b600081600003610c9d57506000919050565b60006001610caa84610d7a565b901c6001901b90506001818481610cc357610cc3611416565b048201901c90506001818481610cdb57610cdb611416565b048201901c90506001818481610cf357610cf3611416565b048201901c90506001818481610d0b57610d0b611416565b048201901c90506001818481610d2357610d23611416565b048201901c90506001818481610d3b57610d3b611416565b048201901c90506001818481610d5357610d53611416565b048201901c9050610d7381828581610d6d57610d6d611416565b04610e0e565b9392505050565b600080608083901c15610d8f57608092831c92015b604083901c15610da157604092831c92015b602083901c15610db357602092831c92015b601083901c15610dc557601092831c92015b600883901c15610dd757600892831c92015b600483901c15610de957600492831c92015b600283901c15610dfb57600292831c92015b600183901c156107145760010192915050565b6000818310610e1d5781610d73565b5090919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715610e7757610e77610e24565b60405290565b600082601f830112610e8e57600080fd5b813567ffffffffffffffff80821115610ea957610ea9610e24565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610eef57610eef610e24565b81604052838152866020858801011115610f0857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f4c57600080fd5b919050565b600080600060608486031215610f6657600080fd5b833567ffffffffffffffff80821115610f7e57600080fd5b610f8a87838801610e7d565b94506020860135915080821115610fa057600080fd5b610fac87838801610e7d565b93506040860135915080821115610fc257600080fd5b908501906101808288031215610fd757600080fd5b610fdf610e53565b82358152602083013560208201526040830135604082015261100360608401610f28565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358381111561105c57600080fd5b6110688a828701610e7d565b828401525050610160915061107e828401610f28565b828201528093505050509250925092565b6000602082840312156110a157600080fd5b81518015158114610d7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611111576111116110b1565b5060010190565b600181815b8085111561117157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611157576111576110b1565b8085161561116457918102915b93841c939080029061111d565b509250929050565b60008261118857506001610714565b8161119557506000610714565b81600181146111ab57600281146111b5576111d1565b6001915050610714565b60ff8411156111c6576111c66110b1565b50506001821b610714565b5060208310610133831016604e8410600b84101617156111f4575081810a610714565b6111fe8383611118565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611230576112306110b1565b029392505050565b6000610d7360ff841683611179565b80820180821115610714576107146110b1565b600181811c9082168061126e57607f821691505b6020821081036112a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156112f757600081815260208120601f850160051c810160208610156112d45750805b601f850160051c820191505b818110156112f3578281556001016112e0565b5050505b505050565b815167ffffffffffffffff81111561131657611316610e24565b61132a81611324845461125a565b846112ad565b602080601f83116001811461137d57600084156113475750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112f3565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113ca578886015182559484019460019091019084016113ab565b508582101561140657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212206716636d7430edf4fe05f9de16b4bfb08a506f426adbe1d2ef8f51900f9bd82f64736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631e77abbc14610030575b600080fd5b61004361003e366004610f51565b610045565b005b61004d610624565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f60209081527f699d9daa71b280d05a152715774afa0a81a312594b2d731d6b0b2552b7d6f69f805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821681179092557ff97e938d8af42f52387bb74b8b526fda8f184cc2aa534340a8d75a88fbecc77580548216831790557f65d510a5d8f7ef134ec444f7f34ee808c8eeb5177cdfd16be0c40fe1ab43369580548216831790557f7f5828d0000000000000000000000000000000000000000000000000000000006000527f5622121b47b8cd0120c4efe45dd5483242f54a3d49bd7679be565d47694918c3805490911690911790558351848201208351848301207fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3aa8290557fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3ab819055467fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a8819055604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187018190528183018690526060820185905260808201939093523060a0808301919091528251808303909101815260c090910190915280519401939093207fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93907fe5b6a7afa77789577f2802f0da58895f660e5798c5c11b2ea18b0a53bd65d3a79081556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016301790556005810182905560006102c36106ef565b90506102d8876101200151886040015161071a565b805160058301556020810151600683015560400151600782015560a0870151815560c0870151600282015561016087015173ffffffffffffffffffffffffffffffffffffffff1661038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e697469616c697a65722e72616e6b696679546f6b656e206e6f742073657460448201526064015b60405180910390fd5b6101608701516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560608801516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290918216906301ffc9a790602401602060405180830381865afa15801561044f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610473919061108f565b610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f52616e6b696679496e7374616e63652d3e696e69743a2072616e6b20746f6b6560448201527f6e206164647265737320646f6573206e6f7420737570706f72742052616e6b2060648201527f696e746572666163650000000000000000000000000000000000000000000000608482015260a401610381565b6060808901516004840180547fffffffffffffffffffffff0000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091177401000000000000000000000000000000000000000017905560408051610100810182526000808252602082018190529181018290528083018290526080810182905260a0810182905260c081019190915260e0810191909152885181526020808a0151908201526040808a0151908201526080808a0151606083015260e0808b0151918301919091526101008a015160a08301526101408a01519082015261061781610885565b5050505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff1633146106ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610381565b565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8525b92915050565b61073e60405180606001604052806000815260200160008152602001600081525090565b61076260405180606001604052806000815260200160008152602001600081525090565b61076b84610c8b565b60208201526000805b8161077e816110e0565b925061078d9050600283611238565b6107979082611247565b905085811061077457858114610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b60408301829052818511610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f717561647261746963566f74696e674572726f720000000000000000000000006044820152606401610381565b50509283525090919050565b80517f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90600003610912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f73657474696e67732e74696d655065725475726e0000000000000000000000006044820152606401610381565b8160200151600003610980576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d6178506c617965727353697a650000000000000000006044820152606401610381565b6002826040015110156109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f73657474696e67732e6d696e506c617965727353697a650000000000000000006044820152606401610381565b8160800151600003610a5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f73657474696e67732e6d61785475726e730000000000000000000000000000006044820152606401610381565b60a08201511580610a76575081604001518260a0015110155b15610add576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e756d57696e6e657273000000000000000000000000000000000000000000006044820152606401610381565b8160600151600003610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f74696d65546f4a6f696e000000000000000000000000000000000000000000006044820152606401610381565b816040015182602001511015610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6d6178506c617965727353697a650000000000000000000000000000000000006044820152606401610381565b8160e0015151600003610c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7375626a656374206c656e6774680000000000000000000000000000000000006044820152606401610381565b815181556020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151829082906007820190610c8490826112fc565b5050505050565b600081600003610c9d57506000919050565b60006001610caa84610d7a565b901c6001901b90506001818481610cc357610cc3611416565b048201901c90506001818481610cdb57610cdb611416565b048201901c90506001818481610cf357610cf3611416565b048201901c90506001818481610d0b57610d0b611416565b048201901c90506001818481610d2357610d23611416565b048201901c90506001818481610d3b57610d3b611416565b048201901c90506001818481610d5357610d53611416565b048201901c9050610d7381828581610d6d57610d6d611416565b04610e0e565b9392505050565b600080608083901c15610d8f57608092831c92015b604083901c15610da157604092831c92015b602083901c15610db357602092831c92015b601083901c15610dc557601092831c92015b600883901c15610dd757600892831c92015b600483901c15610de957600492831c92015b600283901c15610dfb57600292831c92015b600183901c156107145760010192915050565b6000818310610e1d5781610d73565b5090919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715610e7757610e77610e24565b60405290565b600082601f830112610e8e57600080fd5b813567ffffffffffffffff80821115610ea957610ea9610e24565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610eef57610eef610e24565b81604052838152866020858801011115610f0857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f4c57600080fd5b919050565b600080600060608486031215610f6657600080fd5b833567ffffffffffffffff80821115610f7e57600080fd5b610f8a87838801610e7d565b94506020860135915080821115610fa057600080fd5b610fac87838801610e7d565b93506040860135915080821115610fc257600080fd5b908501906101808288031215610fd757600080fd5b610fdf610e53565b82358152602083013560208201526040830135604082015261100360608401610f28565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358381111561105c57600080fd5b6110688a828701610e7d565b828401525050610160915061107e828401610f28565b828201528093505050509250925092565b6000602082840312156110a157600080fd5b81518015158114610d7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611111576111116110b1565b5060010190565b600181815b8085111561117157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611157576111576110b1565b8085161561116457918102915b93841c939080029061111d565b509250929050565b60008261118857506001610714565b8161119557506000610714565b81600181146111ab57600281146111b5576111d1565b6001915050610714565b60ff8411156111c6576111c66110b1565b50506001821b610714565b5060208310610133831016604e8410600b84101617156111f4575081810a610714565b6111fe8383611118565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611230576112306110b1565b029392505050565b6000610d7360ff841683611179565b80820180821115610714576107146110b1565b600181811c9082168061126e57607f821691505b6020821081036112a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156112f757600081815260208120601f850160051c810160208610156112d45750805b601f850160051c820191505b818110156112f3578281556001016112e0565b5050505b505050565b815167ffffffffffffffff81111561131657611316610e24565b61132a81611324845461125a565b846112ad565b602080601f83116001811461137d57600084156113475750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112f3565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113ca578886015182559484019460019091019084016113ab565b508582101561140657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212206716636d7430edf4fe05f9de16b4bfb08a506f426adbe1d2ef8f51900f9bd82f64736f6c63430008140033", "devdoc": { "kind": "dev", "methods": {}, diff --git a/deployments/anvil/RankifyInstanceMainFacet.json b/deployments/anvil/RankifyInstanceMainFacet.json index cf20e89..7b1ee09 100644 --- a/deployments/anvil/RankifyInstanceMainFacet.json +++ b/deployments/anvil/RankifyInstanceMainFacet.json @@ -1,5 +1,5 @@ { - "address": "0x0Ee518212216dc4d3be6A964Fe9b4FfF9383c342", + "address": "0xE0744E372a685aE1c1a4ec3C5E56524b03582c9B", "abi": [ { "anonymous": false, @@ -729,28 +729,28 @@ "type": "function" } ], - "transactionHash": "0x42e13adcce03555c22bf8a62ab5244b9aa677acf7440332d92650e7d244f751e", + "transactionHash": "0xe5e969db58b359d56cfa96d6893fde73aecc4aa4a45abaf8212425076e0e1bce", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", - "from": "0x507c2d32185667156de5B4C440FEEf3800078bDb", + "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", "contractAddress": null, "transactionIndex": 0, "gasUsed": "5053781", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xae062dbbe04c95f50e3722bd766bc4b603ca9bace7e3405a4ad15fea5beec942", - "transactionHash": "0x42e13adcce03555c22bf8a62ab5244b9aa677acf7440332d92650e7d244f751e", + "blockHash": "0x52e4d9cd56a6f19fb54d4efa405965b492527ed1ab800df2c0298f1f3d1f66f4", + "transactionHash": "0xe5e969db58b359d56cfa96d6893fde73aecc4aa4a45abaf8212425076e0e1bce", "logs": [], - "blockNumber": 404, + "blockNumber": 489, "cumulativeGasUsed": "5053781", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "af20401871b7f4e560e69ce739339e01", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"GameClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"GameStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"}],\"name\":\"PlayerJoined\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"PlayerLeft\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameid\",\"type\":\"uint256\"}],\"name\":\"RegistrationOpen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"gm\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"gameCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"canEndTurn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"canStartGame\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"cancelGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"additionalRanks\",\"type\":\"address[]\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"gameCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getContractState\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"gamePrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gamePaymentToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"joinGamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numGames\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rankTokenAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"contractInitialized\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxQuadraticPoints\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuadraticPositons\",\"type\":\"uint256\"}],\"internalType\":\"struct LibQuadraticVoting.qVotingStruct\",\"name\":\"voting\",\"type\":\"tuple\"}],\"internalType\":\"struct IRankifyInstanceCommons.RInstanceSettings\",\"name\":\"BestOfState\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timePerTurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeToJoin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTurns\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numWinners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"subject\",\"type\":\"string\"}],\"internalType\":\"struct LibTBG.GameSettings\",\"name\":\"TBGSEttings\",\"type\":\"tuple\"}],\"internalType\":\"struct IRankifyInstanceCommons.RInstanceState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getGM\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getGameRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getPlayers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"getPlayersGame\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getScores\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getTurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isGameOver\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isLastTurn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isOvertime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isRegistrationOpen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"joinGame\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"leaveGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"openRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"startGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelGame(uint256)\":{\"details\":\"Cancels a game with the provided game ID. `gameId` is the ID of the game. Modifies: - Calls the `enforceIsGameCreator` function with `msg.sender`. Requirements: - The caller must be the game creator of the game with `gameId`. - Game must not be started.\"},\"createGame(address,uint256,uint256)\":{\"details\":\"Creates a new game with the provided game master, game ID, and game rank. Optionally, additional ranks can be provided. `gameMaster` is the address of the game master. `gameId` is the ID of the new game. `gameRank` is the rank of the new game. `additionalRanks` is the array of additional ranks. emits a _GameCreated_ event. Requirements: There are some game price requirments that must be met under gameId.newGame function that are set during the contract initialization and refer to the contract maintainer benefits. Modifies: - Calls the `newGame` function with `gameMaster`, `gameRank`, and `msg.sender`. - Configures the coin vending with `gameId` and an empty configuration. - If `additionalRanks` is not empty, mints rank tokens for each additional rank and sets the additional ranks of the game with `gameId` to `additionalRanks`.\"},\"joinGame(uint256)\":{\"details\":\"Allows a player to join a game with the provided game ID. `gameId` is the ID of the game. emits a _PlayerJoined_ event. Modifies: - Calls the `joinGame` function with `msg.sender`. - Calls the `fund` function with `bytes32(gameId)`. Requirements: - The caller must not be a player in the game with `gameId`. - Game phase must be registration. - Caller must be able to fulfill funding requirements.\"},\"leaveGame(uint256)\":{\"details\":\"Allows a player to leave a game with the provided game ID. `gameId` is the ID of the game. Modifies: - Calls the `quitGame` function with `msg.sender`, `true`, and `onPlayerQuit`. Requirements: - The caller must be a player in the game with `gameId`. - Game must not be started.\"},\"openRegistration(uint256)\":{\"details\":\"Opens registration for a game with the provided game ID. `gameId` is the ID of the game. emits a _RegistrationOpen_ event. Modifies: - Calls the `enforceIsGameCreator` function with `msg.sender`. - Calls the `enforceIsPreRegistrationStage` function. - Calls the `openRegistration` function. Requirements: - The caller must be the game creator of the game with `gameId`. - The game with `gameId` must be in the pre-registration stage.\"},\"startGame(uint256)\":{\"details\":\"Starts a game with the provided game ID early. `gameId` is the ID of the game. emits a _GameStarted_ event. Modifies: - Calls the `enforceGameExists` function. - Calls the `startGameEarly` function. Requirements: - The game with `gameId` must exist.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceMainFacet.sol\":\"RankifyInstanceMainFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../../interfaces/IERC1271.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureChecker {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\\n return\\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x3af3ca86df39aac39a0514c84459d691434a108d2151c8ce9d69f32e315cab80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/DiamondReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/**\\n * Author: @Peersky https://github.com/peersky\\n * Adapted this diamond reentrancy guard from:\\n\\n * Authors: Moonstream Engineering (engineering@moonstream.to)\\n * GitHub: https://github.com/bugout-dev/dao\\n */\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\n\\nabstract contract DiamondReentrancyGuard {\\n modifier nonReentrant() {\\n LibReentrancyGuard.ReentrancyGuardStruct storage rgs = LibReentrancyGuard.reentrancyGuardStorage();\\n require(!rgs._entered, \\\"REG: You shall not pass!\\\");\\n rgs._entered = true;\\n _;\\n rgs._entered = false;\\n }\\n}\\n\",\"keccak256\":\"0xfe1f8e71dc63f898ba9ae59193b975352955e0f8c1a694a78cab07df3389cd91\",\"license\":\"Apache-2.0\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceMainFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\n\\nimport {IERC1155Receiver} from \\\"../interfaces/IERC1155Receiver.sol\\\";\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/DiamondReentrancyGuard.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\ncontract RankifyInstanceMainFacet is\\n IRankifyInstanceCommons,\\n IERC1155Receiver,\\n DiamondReentrancyGuard,\\n IERC721Receiver,\\n EIP712\\n{\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibRankify for uint256;\\n\\n function RInstanceStorage() internal pure returns (RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game master, game ID, and game rank. Optionally, additional ranks can be provided. `gameMaster` is the address of the game master. `gameId` is the ID of the new game. `gameRank` is the rank of the new game. `additionalRanks` is the array of additional ranks.\\n *\\n * emits a _GameCreated_ event.\\n *\\n * Requirements:\\n * There are some game price requirments that must be met under gameId.newGame function that are set during the contract initialization and refer to the contract maintainer benefits.\\n *\\n * Modifies:\\n *\\n * - Calls the `newGame` function with `gameMaster`, `gameRank`, and `msg.sender`.\\n * - Configures the coin vending with `gameId` and an empty configuration.\\n * - If `additionalRanks` is not empty, mints rank tokens for each additional rank and sets the additional ranks of the game with `gameId` to `additionalRanks`.\\n */\\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank) public nonReentrant {\\n gameId.newGame(gameMaster, gameRank, msg.sender);\\n LibCoinVending.ConfigPosition memory emptyConfig;\\n LibCoinVending.configure(bytes32(gameId), emptyConfig);\\n emit gameCreated(gameId, gameMaster, msg.sender, gameRank);\\n }\\n\\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank, address[] memory additionalRanks) public {\\n createGame(gameMaster, gameId, gameRank);\\n RInstance storage game = gameId.getGameStorage();\\n if (additionalRanks.length != 0) {\\n for (uint256 i = 0; i < additionalRanks.length; i++) {\\n IRankToken additonalRank = IRankToken(additionalRanks[i]);\\n require(additonalRank.supportsInterface(type(IRankToken).interfaceId), \\\"must support rank interface\\\");\\n require(additonalRank.getRankingInstance() == address(this), \\\"must be rankingInstance\\\");\\n additonalRank.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n additonalRank.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n game.additionalRanks = additionalRanks;\\n }\\n }\\n\\n function createGame(address gameMaster, uint256 gameRank) public {\\n LibRankify.enforceIsInitialized();\\n RInstanceSettings storage settings = RInstanceStorage();\\n createGame(gameMaster, settings.numGames + 1, gameRank);\\n }\\n\\n /**\\n * @dev Handles a player quitting a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * emits a _PlayerLeft_ event.\\n *\\n * Modifies:\\n *\\n * - Refunds the coins for `player` in the game with `gameId`.\\n */\\n function onPlayerQuit(uint256 gameId, address player) private {\\n LibCoinVending.refund(bytes32(gameId), player);\\n emit PlayerLeft(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the game creator of the game with `gameId`.\\n * - Game must not be started.\\n */\\n function cancelGame(uint256 gameId) public nonReentrant {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.cancelGame(onPlayerQuit, LibDiamond.contractOwner());\\n emit GameClosed(gameId);\\n }\\n\\n /**\\n * @dev Allows a player to leave a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Calls the `quitGame` function with `msg.sender`, `true`, and `onPlayerQuit`.\\n *\\n * Requirements:\\n *\\n * - The caller must be a player in the game with `gameId`.\\n * - Game must not be started.\\n */\\n function leaveGame(uint256 gameId) public nonReentrant {\\n gameId.quitGame(msg.sender, true, onPlayerQuit);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * emits a _RegistrationOpen_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\\n * - Calls the `enforceIsPreRegistrationStage` function.\\n * - Calls the `openRegistration` function.\\n *\\n * Requirements:\\n *\\n * - The caller must be the game creator of the game with `gameId`.\\n * - The game with `gameId` must be in the pre-registration stage.\\n */\\n function openRegistration(uint256 gameId) public {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.enforceIsPreRegistrationStage();\\n gameId.openRegistration();\\n emit RegistrationOpen(gameId);\\n }\\n\\n /**\\n * @dev Allows a player to join a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * emits a _PlayerJoined_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `joinGame` function with `msg.sender`.\\n * - Calls the `fund` function with `bytes32(gameId)`.\\n *\\n * Requirements:\\n *\\n * - The caller must not be a player in the game with `gameId`.\\n * - Game phase must be registration.\\n * - Caller must be able to fulfill funding requirements.\\n */\\n function joinGame(uint256 gameId) public payable nonReentrant {\\n gameId.joinGame(msg.sender);\\n LibCoinVending.fund(bytes32(gameId));\\n emit PlayerJoined(gameId, msg.sender);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n *\\n * emits a _GameStarted_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceGameExists` function.\\n * - Calls the `startGameEarly` function.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function startGame(uint256 gameId) public {\\n gameId.enforceGameExists();\\n gameId.startGameEarly();\\n emit GameStarted(gameId);\\n }\\n\\n function onERC1155Received(\\n address operator,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) public view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"));\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function onERC1155BatchReceived(\\n address operator,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"));\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function onERC721Received(\\n address operator,\\n address,\\n uint256,\\n bytes calldata\\n ) external view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return IERC721Receiver.onERC721Received.selector;\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function getContractState() public view returns (RInstanceState memory) {\\n RInstanceSettings storage settings = RInstanceStorage();\\n LibTBG.GameSettings memory tbgSettings = LibTBG.getGameSettings();\\n return (RInstanceState({BestOfState: settings, TBGSEttings: tbgSettings}));\\n }\\n\\n function getTurn(uint256 gameId) public view returns (uint256) {\\n return gameId.getTurn();\\n }\\n\\n function getGM(uint256 gameId) public view returns (address) {\\n return gameId.getGM();\\n }\\n\\n function getScores(uint256 gameId) public view returns (address[] memory, uint256[] memory) {\\n return gameId.getScores();\\n }\\n\\n function isOvertime(uint256 gameId) public view returns (bool) {\\n return gameId.isOvertime();\\n }\\n\\n function isGameOver(uint256 gameId) public view returns (bool) {\\n return gameId.isGameOver();\\n }\\n\\n function getPlayersGame(address player) public view returns (uint256) {\\n return LibTBG.getPlayersGame(player);\\n }\\n\\n function isLastTurn(uint256 gameId) public view returns (bool) {\\n return gameId.isLastTurn();\\n }\\n\\n function isRegistrationOpen(uint256 gameId) public view returns (bool) {\\n return gameId.isRegistrationOpen();\\n }\\n\\n function gameCreator(uint256 gameId) public view returns (address) {\\n return gameId.getGameStorage().createdBy;\\n }\\n\\n function getGameRank(uint256 gameId) public view returns (uint256) {\\n return gameId.getGameStorage().rank;\\n }\\n\\n function getPlayers(uint256 gameId) public view returns (address[] memory) {\\n return gameId.getPlayers();\\n }\\n\\n function canStartGame(uint256 gameId) public view returns (bool) {\\n return gameId.canStartEarly();\\n }\\n\\n function canEndTurn(uint256 gameId) public view returns (bool) {\\n return gameId.canEndTurnEarly();\\n }\\n}\\n\",\"keccak256\":\"0xbed4cccf43d44891f7f9e06197c116cfa9ecad2454f5da6f2ab74f55d6f42348\",\"license\":\"MIT\"},\"src/interfaces/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @title ERC1155 transfer receiver interface\\n */\\ninterface IERC1155Receiver {\\n /**\\n * @notice validate receipt of ERC1155 transfer\\n * @param operator executor of transfer\\n * @param from sender of tokens\\n * @param id token ID received\\n * @param value quantity of tokens received\\n * @param data data payload\\n * @return function's own selector if transfer is accepted\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @notice validate receipt of ERC1155 batch transfer\\n * @param operator executor of transfer\\n * @param from sender of tokens\\n * @param ids token IDs received\\n * @param values quantities of tokens received\\n * @param data data payload\\n * @return function's own selector if transfer is accepted\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa27ad77bced0575dc3a3e4eb8f334a4889f16e5cae2053272676ff69ca9379e2\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef038fdedc9d4857f9f190562c07849c9813fd4ae927a4e81cef94a29a3f5ed\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * ***WARNING*** This function is unused in the current implementation of the library.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x01cc4615c50c7ab606c54ea358f57db5fd6273518983a5659b21edc771aaa037\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50615ac480620000216000396000f3fe6080604052600436106101965760003560e01c80639637460e116100e1578063bfa640361161008a578063e5ed1d5911610064578063e5ed1d59146104d7578063efaa55a0146104f7578063f23a6e611461050a578063f72ea4671461052a57600080fd5b8063bfa6403614610477578063cca84a0c14610497578063e240ae5f146104b757600080fd5b8063b55991c0116100bb578063b55991c014610417578063b881cffe14610437578063bc197c811461045757600080fd5b80639637460e146103845780639a214b1e146103a4578063aee5f34a146103d257600080fd5b80634024ba751161014357806369958ab91161011d57806369958ab9146103225780637f4e4849146103425780638eed01f81461036457600080fd5b80634024ba75146102b5578063460e2049146102d557806358759df71461030257600080fd5b8063392b749c11610174578063392b749c146102455780633b17469e146102755780633feef58a1461029557600080fd5b806304527d901461019b57806307ead930146101d2578063150b7a02146101f4575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004614fc8565b61054a565b6040516101c9929190615032565b60405180910390f35b3480156101de57600080fd5b506101f26101ed3660046150bb565b61055f565b005b34801561020057600080fd5b5061021461020f366004615130565b610593565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101c9565b34801561025157600080fd5b50610265610260366004614fc8565b6105ee565b60405190151581526020016101c9565b34801561028157600080fd5b506101f26102903660046151a3565b6105ff565b3480156102a157600080fd5b506101f26102b0366004614fc8565b61076c565b3480156102c157600080fd5b506102656102d0366004614fc8565b61085d565b3480156102e157600080fd5b506102f56102f0366004614fc8565b610868565b6040516101c991906151d8565b34801561030e57600080fd5b5061026561031d366004614fc8565b610873565b34801561032e57600080fd5b506101f261033d366004614fc8565b61087e565b34801561034e57600080fd5b506103576109de565b6040516101c991906152a9565b34801561037057600080fd5b5061026561037f366004614fc8565b610ab8565b34801561039057600080fd5b5061026561039f366004614fc8565b610ac3565b3480156103b057600080fd5b506103c46103bf366004614fc8565b610afc565b6040519081526020016101c9565b3480156103de57600080fd5b506103f26103ed366004614fc8565b610b0e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c9565b34801561042357600080fd5b506103c4610432366004614fc8565b610b39565b34801561044357600080fd5b50610265610452366004614fc8565b610b6f565b34801561046357600080fd5b5061021461047236600461538e565b610b7a565b34801561048357600080fd5b506103c461049236600461544d565b610bd8565b3480156104a357600080fd5b506101f26104b2366004614fc8565b610c22565b3480156104c357600080fd5b506101f26104d2366004615499565b610c6c565b3480156104e357600080fd5b506101f26104f2366004614fc8565b611062565b6101f2610505366004614fc8565b6110a2565b34801561051657600080fd5b506102146105253660046155a2565b6111c9565b34801561053657600080fd5b506103f2610545366004614fc8565b611225565b6060806105568361126e565b91509150915091565b610567611382565b6000610571611418565b905061058e8382600301546001610588919061564d565b846105ff565b505050565b600061059d611382565b3073ffffffffffffffffffffffffffffffffffffffff8716036105e157507f150b7a02000000000000000000000000000000000000000000000000000000006105e5565b5060005b95945050505050565b60006105f982611441565b92915050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff1615610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f74207061737321000000000000000060448201526064015b60405180910390fd5b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556106c6838584336114e7565b6106ce614db0565b6106d884826117fd565b823373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f48f48f6273652830aa3718ca489b3d13c244a7215c70bab5c5c2f523aba583b68760405161073891815260200190565b60405180910390a45080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff16156107f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782556108349083903390611cab611cfc565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006105f982611e20565b60606105f982611eaf565b60006105f982611ef2565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815561093e8233611f7b565b61098a611cab6109827fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b849190612018565b60405182907f71f4c9aec1b2c51302bcaf09a3f4985709759853536445493905081899603a2190600090a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b6109e6614dfa565b60006109f0611418565b905060006109fc612213565b60408051610120810182528454818301908152600186015473ffffffffffffffffffffffffffffffffffffffff90811660608085019190915260028801546080850152600388015460a0850152600488015491821660c08501527401000000000000000000000000000000000000000090910460ff16151560e084015283519081018452600587015481526006870154602080830191909152600790970154938101939093526101008201929092529081529283015250919050565b60006105f982612432565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600b015460ff166105f9565b6000610b07826124c7565b5492915050565b6000610b19826124c7565b6001015473ffffffffffffffffffffffffffffffffffffffff1692915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101546105f9565b60006105f9826124ff565b6000610b84611382565b3073ffffffffffffffffffffffffffffffffffffffff8a1603610bc857507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621610bcc565b5060005b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120546105f9565b610c2c8133611f7b565b610c3581612586565b610c3e816126b7565b60405181907f5da9fef10786347975dd7cc4fc53417cff6969b0f7a9b6763169306c8cbeb63690600090a250565b610c778484846105ff565b6000610c82846124c7565b9050815160001461105b5760005b8251811015611043576000838281518110610cad57610cad615660565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290915073ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d69919061568f565b610dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d75737420737570706f72742072616e6b20696e7465726661636500000000006044820152606401610688565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16635c87c8f96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5591906156b1565b73ffffffffffffffffffffffffffffffffffffffff1614610ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d7573742062652072616e6b696e67496e7374616e63650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff811663731133e9306001610efb898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b5050505050808061103b906156ce565b915050610c90565b5081516110599060088301906020850190614e5f565b505b5050505050565b61106b8161275c565b611074816127d3565b60405181907f50ad08f58a27f2851d7e3a1b3a6a46b290f2ce677e99642d30ff639721e7779090600090a250565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556111628233612ae0565b61116b82612bec565b60405133815282907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006111d3611382565b3073ffffffffffffffffffffffffffffffffffffffff88160361121757507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9761121b565b5060005b9695505050505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081205473ffffffffffffffffffffffffffffffffffffffff166105f9565b606080600061127c84611eaf565b90506000815167ffffffffffffffff81111561129a5761129a61546a565b6040519080825280602002602001820160405280156112c3578160200160208202803683370190505b50905060005b825181101561137757611348868483815181106112e8576112e8615660565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b82828151811061135a5761135a615660565b60209081029190910101528061136f816156ce565b9150506112c9565b509094909350915050565b600061138c611418565b600481015490915074010000000000000000000000000000000000000000900460ff16611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610688565b50565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8526105f9565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d906114be60058401612c51565b14806114ce57506114ce84612c5b565b156114dd575060019392505050565b5060009392505050565b6114ef611382565b60006114f9611418565b90506115058585612d2e565b6000611510866124c7565b90508360000361157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f67616d652072616e6b206e6f74207370656369666965640000000000000000006044820152606401610688565b81541561163357600182015482546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015611606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162a919061568f565b50815460098201555b600181810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861617905560038301805460009061168a90849061564d565b9091555050838155600482015473ffffffffffffffffffffffffffffffffffffffff168063731133e93060016116c0898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b15801561174157600080fd5b505af1158015611755573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b5050505050505050505050565b60006118528360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905080600801546000148061187d575080600701548160060154611876919061564d565b8160080154145b611909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610688565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155611947600a82016000614ee9565b611955600b82016000614ee9565b611963600982016000614f07565b60005b826020015151811015611c7a5781600a018360200151828151811061198d5761198d615660565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b8401919083908110611a0c57611a0c615660565b602090810291909101810151810151825460018101845560009384529282902090920191909155830151805160098401919083908110611a4e57611a4e615660565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a918202191690836002811115611a9e57611a9e615706565b021790555082602001518181518110611ab957611ab9615660565b60200260200101516060015182600001600085602001518481518110611ae157611ae1615660565b6020026020010151604001516002811115611afe57611afe615706565b6002811115611b0f57611b0f615706565b8152602001908152602001600020600085602001518481518110611b3557611b35615660565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110611b9357611b93615660565b60209081029190910181015181015182528101919091526040016000208151805182908190611bc290826157ce565b50602091820151600190910155820151805160028301908190611be590826157ce565b50602091909101516001909101556040820151805160048301908190611c0b90826157ce565b50602091909101516001909101556060820151805160068301908190611c3190826157ce565b50602091909101516001909101556080820151805160088301908190611c5790826157ce565b506020820151816001015550509050508080611c72906156ce565b915050611966565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b611cb5828261302c565b60405173ffffffffffffffffffffffffffffffffffffffff82169083907fb2bd643202385c64d9814c6c3fa61b1ba098d6652292e9d9a6f1a0cdae6eb82490600090a35050565b6000611d06611418565b90508060020154600014611e0857600083611d22576001611d25565b60025b60ff1690506000818360020154611d3c91906158e8565b90506000611d49886124c7565b905081816009016000828254611d5f9190615923565b909155505060018401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e03919061568f565b505050505b611e12858561308d565b61105b85858463ffffffff16565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303611e84575060009392505050565b6003810154611e93904261564d565b826003015410611ea4576000611ea7565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090611eeb6005820161315a565b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206000611f2d82600501612c51565b826008015414611f3e576000611f41565b60015b600483015490915060ff161580611f5c5750611f5c84612432565b15611f6b575060009392505050565b80806114ce57506114ce84613167565b611f848261275c565b6000611f8f836124c7565b600181015490915073ffffffffffffffffffffffffffffffffffffffff83811691161461058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f720000000000000000000000000000006044820152606401610688565b600061202384611eaf565b905060005b8151811015612069576120578583838151811061204757612047615660565b6020026020010151600087611cfc565b80612061816156ce565b915050612028565b506000612075856124c7565b90506000612081611418565b905060006002826000015461209691906158e8565b600183810154908501546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b919061568f565b50808360090160008282546121509190615923565b9091555050600182015460098401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482019290925291169063a9059cbb906044016020604051808303816000875af11580156121d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f9919061568f565b506000600984015561220a876131db565b50505050505050565b61225b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60408051610100810182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d805482527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e5460208301527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f54928201929092527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f305460608201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460808201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f325460a08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f335460c08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f348054839160e08401916123aa90615735565b80601f01602080910402602001604051908101604052809291908181526020018280546123d690615735565b80156124235780601f106123f857610100808354040283529160200191612423565b820191906000526020600020905b81548152906001019060200180831161240657829003601f168201915b50505050508152505091505090565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156114ce5750600b81015460ff166114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a01548190611eeb565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d929190036114dd575060019392505050565b61258f81611e20565b1561261c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610688565b6126c081613446565b612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f67616d65206e6f7420666f756e640000000000000000000000000000000000006044820152606401610688565b60009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902042600390910155565b612764611382565b61276d81613446565b611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f737461727447616d652d3e616c726561647920737461727465640000000000006044820152606401610688565b8160030154600003612925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f737461727447616d652d3e47616d6520726567697374726174696f6e2077617360448201527f206e6f7420796574206f70656e000000000000000000000000000000000000006064820152608401610688565b8260000361298f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f737461727447616d652d3e47616d65206e6f7420666f756e64000000000000006044820152606401610688565b60028101546129a060058401612c51565b1015612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6001810154612a1960058401612c51565b1480612a37575060038082015490830154612a34919061564d565b42115b612a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6004820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660019081179091558281015542600283015561058e826134a2565b612ae98261275c565b612af38282613533565b6000612afd611418565b90508060020154600014612be257600181015460028201546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015612b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb5919061568f565b506000612bc1846124c7565b90508160020154816009016000828254612bdb919061564d565b9091555050505b61058e83836135e7565b6000612c418260408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050612c4d8133613886565b5050565b60006105f9825490565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612cc1575060009392505050565b8160030154600003612cd7575060009392505050565b83600003612ce9575060009392505050565b60038082015490830154612cfd919061564d565b4211612d0d575060009392505050565b6002810154612d1e60058401612c51565b1015611ea4575060009392505050565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d612d5883613446565b15612dbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63726561746547616d652d3e416c7265616479206578697374730000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216612e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746547616d652d3e474d0000000000000000000000000000000000006044820152606401610688565b82600003612ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b600083815260088201602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b6000838152600882016020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516179055600a8201805460019290612f9790849061564d565b9091555050600a8101546040805160208101869052908101919091527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d6060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009586526008909301909152909220600a019190915550565b60006130818360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061058e8183613920565b6130968261275c565b6130a082826139c3565b60006130aa611418565b905060006130b7846124c7565b905060018160000154111561315457805460048301546130ee91859173ffffffffffffffffffffffffffffffffffffffff16613bcf565b60005b600882015481101561105b5761314284836000015484600801848154811061311b5761311b615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613bcf565b8061314c816156ce565b9150506130f1565b50505050565b60606000611eeb83613c68565b60008061317383613cc4565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806131bc57506131bc84612432565b156131cb575060009392505050565b81156114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d916132366005830161315a565b905060005b8151811015613355576000846008016000878152602001908152602001600020600901600084848151811061327257613272615660565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600084600801600087815260200190815260200160002060070160008484815181106132e6576132e6615660565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061334d816156ce565b91505061323b565b506000848152600884016020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055600a8101829055600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556133fd91600c90910190614ee9565b60008481526008808501602052604082209081018290556005019081816134248282614ee9565b5050506000948552505050600801602052604081206003810182905560020155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff16156134995750600192915050565b50600092915050565b60005b6134b182600501612c51565b811015612c4d5760006134c76005840183613d5d565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560098601909152812055508061352b816156ce565b9150506134a5565b600061353d611418565b9050600061354a846124c7565b9050600181600001541115613154578054600483015461358191859173ffffffffffffffffffffffffffffffffffffffff16613d69565b60005b600882015481101561105b576135d58483600001548460080184815481106135ae576135ae615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613d69565b806135df816156ce565b915050613584565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d61361183613446565b613677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f616464506c617965722d3e696e76616c69642067616d650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090205415613706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f616464506c617965722d3e506c6179657220696e2067616d65000000000000006044820152606401610688565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020600182015461374460058301612c51565b106137ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464506c617965722d3e70617274792066756c6c00000000000000000000006044820152606401610688565b6137b484613dce565b61381a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f616464506c617965722d3e63616e74206a6f696e206e6f7700000000000000006044820152606401610688565b6138276005820184613e27565b5073ffffffffffffffffffffffffffffffffffffffff909216600090815260079092016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560099092019052902055565b600c82015460ff166138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f736974696f6e20646f6573206e6f742065786973740000000000000000006044820152606401610688565b613902828230303030613e49565b6001826008016000828254613917919061564d565b90915550505050565b816008015482600701548360060154613939919061564d565b106139a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656e6f7567682062616c616e636520746f20726566756e64000000006044820152606401610688565b6139ae823083848586613e49565b6001826006016000828254613917919061564d565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90613a1b84613446565b613a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009830160205260409020548414613b11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d6500000000000000000000000000000000006044820152606401610688565b600481015460ff161580613b345750600481015460ff6101009091041615156001145b613b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e63652073746172746564000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561105b60058201846141ed565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c68906064015b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613cb857602002820191906000526020600020905b815481526020019060010190808311613ca4575b50505050509050919050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9083600003613d2357613d23615936565b600481015460ff161515600114613d3c57613d3c615936565b60028101548254613d4d919061564d565b4211611ea4575060009392505050565b6000611eeb838361420f565b6040517fe2ab691d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063e2ab691d90606401613c30565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600481015460ff1680613e1057506003810154155b15613e1e5750600092915050565b50600192915050565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff8416614239565b3073ffffffffffffffffffffffffffffffffffffffff861603613fb357600286015415613eb857600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f19350505050158015613eb6573d6000803e3d6000fd5b505b600486015415613f0a57600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f19350505050158015613f08573d6000803e3d6000fd5b505b600586015415613f5c57600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f19350505050158015613f5a573d6000803e3d6000fd5b505b600386015415613fae57600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613fac573d6000803e3d6000fd5b505b614057565b60038601546005870154600488015460028901546000939291613fd59161564d565b613fdf919061564d565b613fe9919061564d565b905080341015614055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f770000000000000000000000000000006044820152606401610688565b505b60005b600a87015481101561220a57600087600a01828154811061407d5761407d615660565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff909216935090849081106140b9576140b9615660565b9060005260206000200154905060008960090184815481106140dd576140dd615660565b60009182526020808320908204015460ff601f9092166101000a90041691508a8183600281111561411057614110615706565b600281111561412157614121615706565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561417057614170615706565b036141895761418484828c8c8c8c8c614288565b6141d6565b600282600281111561419d5761419d615706565b036141ad5761418484828c61440b565b60018260028111156141c1576141c1615706565b036141d6576141d68484838d8d8d8d8d6145d6565b5050505080806141e5906156ce565b91505061405a565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff84166149bd565b600082600001828154811061422657614226615660565b9060005260206000200154905092915050565b6000818152600183016020526040812054614280575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f9565b5060006105f9565b61429b8786838960020160010154614ab0565b6142ae8786848960040160010154614ab0565b6142c18786868960060160010154614ab0565b6142d48786858960080160010154614ab0565b600186015487908015801590614300575073ffffffffffffffffffffffffffffffffffffffff87163014155b15614400576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015614374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143989190615965565b1015614400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e730000000000000000006044820152606401610688565b505050505050505050565b6003820154839015801561442157506005830154155b801561442f57506007830154155b801561443d57506009830154155b6144a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f7274656400006044820152606401610688565b6001830154158015906144cc575073ffffffffffffffffffffffffffffffffffffffff82163014155b15613154576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015614541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145659190615965565b600185015490915081101561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e6365000000000000006044820152606401610688565b6001860154889080156146ea576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa158015614658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061467c9190615965565b9050818110156146e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c6964000000006044820152606401610688565b505b5060078701548015614770578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b815260040161473d95949392919061597e565b600060405180830381600087803b15801561475757600080fd5b505af115801561476b573d6000803e3d6000fd5b505050505b50600987015480156147f6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b81526004016147c395949392919061597e565b600060405180830381600087803b1580156147dd57600080fd5b505af11580156147f1573d6000803e3d6000fd5b505050505b506005870154801561492b5773ffffffffffffffffffffffffffffffffffffffff84166148b1576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b15801561489457600080fd5b505af11580156148a8573d6000803e3d6000fd5b5050505061492b565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b81526004016148f895949392919061597e565b600060405180830381600087803b15801561491257600080fd5b505af1158015614926573d6000803e3d6000fd5b505050505b50600387015480156149b1578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b815260040161497e95949392919061597e565b600060405180830381600087803b15801561499857600080fd5b505af11580156149ac573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015614aa65760006149e1600183615923565b85549091506000906149f590600190615923565b9050818114614a5a576000866000018281548110614a1557614a15615660565b9060005260206000200154905080876000018481548110614a3857614a38615660565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6b57614a6b615a5f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f9565b60009150506105f9565b83811561105b573073ffffffffffffffffffffffffffffffffffffffff851603614c155773ffffffffffffffffffffffffffffffffffffffff831615614b90576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015614b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b8a919061568f565b5061105b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050505061105b565b73ffffffffffffffffffffffffffffffffffffffff831615614c94576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401614b47565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af1158015614d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d33919061568f565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614d9c57600080fd5b505af1158015614400573d6000803e3d6000fd5b6040518060400160405280614ded6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001606081525090565b6040518060400160405280614e0d614f2c565b8152602001614e5a60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b905290565b828054828255906000526020600020908101928215614ed9579160200282015b82811115614ed957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190614e7f565b50614ee5929150614fb3565b5090565b50805460008255906000526020600020908101906114159190614fb3565b50805460008255601f0160209004906000526020600020908101906114159190614fb3565b6040518060e0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001614e5a60405180606001604052806000815260200160008152602001600081525090565b5b80821115614ee55760008155600101614fb4565b600060208284031215614fda57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561502757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614ff5565b509495945050505050565b6040815260006150456040830185614fe1565b82810360208481019190915284518083528582019282019060005b8181101561507c57845183529383019391830191600101615060565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141557600080fd5b80356150b681615089565b919050565b600080604083850312156150ce57600080fd5b82356150d981615089565b946020939093013593505050565b60008083601f8401126150f957600080fd5b50813567ffffffffffffffff81111561511157600080fd5b60208301915083602082850101111561512957600080fd5b9250929050565b60008060008060006080868803121561514857600080fd5b853561515381615089565b9450602086013561516381615089565b935060408601359250606086013567ffffffffffffffff81111561518657600080fd5b615192888289016150e7565b969995985093965092949392505050565b6000806000606084860312156151b857600080fd5b83356151c381615089565b95602085013595506040909401359392505050565b602081526000611eeb6020830184614fe1565b6000610100825184526020808401518186015260408401516040860152606084015160608601526080840151608086015260a084015160a086015260c084015160c086015260e08401518260e087015280518084880152600093505b8084101561526657818401830151878501610120015292820192615247565b61012093506000848289010152837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011688010194505050505092915050565b602081526000825180516020840152602081015173ffffffffffffffffffffffffffffffffffffffff808216604086015260408301516060860152606083015160808601528060808401511660a0860152505060a0810151151560c084015260c08101519050805160e084015260208101516101008401526040810151610120840152506020830151610140808185015250611ea76101608401826151eb565b60008083601f84011261535b57600080fd5b50813567ffffffffffffffff81111561537357600080fd5b6020830191508360208260051b850101111561512957600080fd5b60008060008060008060008060a0898b0312156153aa57600080fd5b88356153b581615089565b975060208901356153c581615089565b9650604089013567ffffffffffffffff808211156153e257600080fd5b6153ee8c838d01615349565b909850965060608b013591508082111561540757600080fd5b6154138c838d01615349565b909650945060808b013591508082111561542c57600080fd5b506154398b828c016150e7565b999c989b5096995094979396929594505050565b60006020828403121561545f57600080fd5b8135611eeb81615089565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080608085870312156154af57600080fd5b84356154ba81615089565b9350602085810135935060408601359250606086013567ffffffffffffffff808211156154e657600080fd5b818801915088601f8301126154fa57600080fd5b81358181111561550c5761550c61546a565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561554f5761554f61546a565b60405291825284820192508381018501918b83111561556d57600080fd5b938501935b8285101561559257615583856150ab565b84529385019392850192615572565b989b979a50959850505050505050565b60008060008060008060a087890312156155bb57600080fd5b86356155c681615089565b955060208701356155d681615089565b94506040870135935060608701359250608087013567ffffffffffffffff81111561560057600080fd5b61560c89828a016150e7565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156156a157600080fd5b81518015158114611eeb57600080fd5b6000602082840312156156c357600080fd5b8151611eeb81615089565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036156ff576156ff61561e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181811c9082168061574957607f821691505b602082108103615782577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561058e57600081815260208120601f850160051c810160208610156157af5750805b601f850160051c820191505b81811015611059578281556001016157bb565b815167ffffffffffffffff8111156157e8576157e861546a565b6157fc816157f68454615735565b84615788565b602080601f83116001811461584f57600084156158195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611059565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561589c5788860151825594840194600190910190840161587d565b50858210156158d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008261591e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60006020828403121561597757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a060808501526000915084546159c581615735565b8060a087015260c06001808416600081146159e75760018114615a1f57615a4d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650615a4d565b896000528560002060005b85811015615a455781548b8201860152908301908701615a2a565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f004b5565099d976a1bf33745fd656bdc1dea4e19fcdbee683b04d21eb1b38f064736f6c63430008140033", - "deployedBytecode": "0x6080604052600436106101965760003560e01c80639637460e116100e1578063bfa640361161008a578063e5ed1d5911610064578063e5ed1d59146104d7578063efaa55a0146104f7578063f23a6e611461050a578063f72ea4671461052a57600080fd5b8063bfa6403614610477578063cca84a0c14610497578063e240ae5f146104b757600080fd5b8063b55991c0116100bb578063b55991c014610417578063b881cffe14610437578063bc197c811461045757600080fd5b80639637460e146103845780639a214b1e146103a4578063aee5f34a146103d257600080fd5b80634024ba751161014357806369958ab91161011d57806369958ab9146103225780637f4e4849146103425780638eed01f81461036457600080fd5b80634024ba75146102b5578063460e2049146102d557806358759df71461030257600080fd5b8063392b749c11610174578063392b749c146102455780633b17469e146102755780633feef58a1461029557600080fd5b806304527d901461019b57806307ead930146101d2578063150b7a02146101f4575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004614fc8565b61054a565b6040516101c9929190615032565b60405180910390f35b3480156101de57600080fd5b506101f26101ed3660046150bb565b61055f565b005b34801561020057600080fd5b5061021461020f366004615130565b610593565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101c9565b34801561025157600080fd5b50610265610260366004614fc8565b6105ee565b60405190151581526020016101c9565b34801561028157600080fd5b506101f26102903660046151a3565b6105ff565b3480156102a157600080fd5b506101f26102b0366004614fc8565b61076c565b3480156102c157600080fd5b506102656102d0366004614fc8565b61085d565b3480156102e157600080fd5b506102f56102f0366004614fc8565b610868565b6040516101c991906151d8565b34801561030e57600080fd5b5061026561031d366004614fc8565b610873565b34801561032e57600080fd5b506101f261033d366004614fc8565b61087e565b34801561034e57600080fd5b506103576109de565b6040516101c991906152a9565b34801561037057600080fd5b5061026561037f366004614fc8565b610ab8565b34801561039057600080fd5b5061026561039f366004614fc8565b610ac3565b3480156103b057600080fd5b506103c46103bf366004614fc8565b610afc565b6040519081526020016101c9565b3480156103de57600080fd5b506103f26103ed366004614fc8565b610b0e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c9565b34801561042357600080fd5b506103c4610432366004614fc8565b610b39565b34801561044357600080fd5b50610265610452366004614fc8565b610b6f565b34801561046357600080fd5b5061021461047236600461538e565b610b7a565b34801561048357600080fd5b506103c461049236600461544d565b610bd8565b3480156104a357600080fd5b506101f26104b2366004614fc8565b610c22565b3480156104c357600080fd5b506101f26104d2366004615499565b610c6c565b3480156104e357600080fd5b506101f26104f2366004614fc8565b611062565b6101f2610505366004614fc8565b6110a2565b34801561051657600080fd5b506102146105253660046155a2565b6111c9565b34801561053657600080fd5b506103f2610545366004614fc8565b611225565b6060806105568361126e565b91509150915091565b610567611382565b6000610571611418565b905061058e8382600301546001610588919061564d565b846105ff565b505050565b600061059d611382565b3073ffffffffffffffffffffffffffffffffffffffff8716036105e157507f150b7a02000000000000000000000000000000000000000000000000000000006105e5565b5060005b95945050505050565b60006105f982611441565b92915050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff1615610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f74207061737321000000000000000060448201526064015b60405180910390fd5b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556106c6838584336114e7565b6106ce614db0565b6106d884826117fd565b823373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f48f48f6273652830aa3718ca489b3d13c244a7215c70bab5c5c2f523aba583b68760405161073891815260200190565b60405180910390a45080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff16156107f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782556108349083903390611cab611cfc565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006105f982611e20565b60606105f982611eaf565b60006105f982611ef2565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815561093e8233611f7b565b61098a611cab6109827fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b849190612018565b60405182907f71f4c9aec1b2c51302bcaf09a3f4985709759853536445493905081899603a2190600090a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b6109e6614dfa565b60006109f0611418565b905060006109fc612213565b60408051610120810182528454818301908152600186015473ffffffffffffffffffffffffffffffffffffffff90811660608085019190915260028801546080850152600388015460a0850152600488015491821660c08501527401000000000000000000000000000000000000000090910460ff16151560e084015283519081018452600587015481526006870154602080830191909152600790970154938101939093526101008201929092529081529283015250919050565b60006105f982612432565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600b015460ff166105f9565b6000610b07826124c7565b5492915050565b6000610b19826124c7565b6001015473ffffffffffffffffffffffffffffffffffffffff1692915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101546105f9565b60006105f9826124ff565b6000610b84611382565b3073ffffffffffffffffffffffffffffffffffffffff8a1603610bc857507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621610bcc565b5060005b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120546105f9565b610c2c8133611f7b565b610c3581612586565b610c3e816126b7565b60405181907f5da9fef10786347975dd7cc4fc53417cff6969b0f7a9b6763169306c8cbeb63690600090a250565b610c778484846105ff565b6000610c82846124c7565b9050815160001461105b5760005b8251811015611043576000838281518110610cad57610cad615660565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290915073ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d69919061568f565b610dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d75737420737570706f72742072616e6b20696e7465726661636500000000006044820152606401610688565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16635c87c8f96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5591906156b1565b73ffffffffffffffffffffffffffffffffffffffff1614610ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d7573742062652072616e6b696e67496e7374616e63650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff811663731133e9306001610efb898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b5050505050808061103b906156ce565b915050610c90565b5081516110599060088301906020850190614e5f565b505b5050505050565b61106b8161275c565b611074816127d3565b60405181907f50ad08f58a27f2851d7e3a1b3a6a46b290f2ce677e99642d30ff639721e7779090600090a250565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556111628233612ae0565b61116b82612bec565b60405133815282907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006111d3611382565b3073ffffffffffffffffffffffffffffffffffffffff88160361121757507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9761121b565b5060005b9695505050505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081205473ffffffffffffffffffffffffffffffffffffffff166105f9565b606080600061127c84611eaf565b90506000815167ffffffffffffffff81111561129a5761129a61546a565b6040519080825280602002602001820160405280156112c3578160200160208202803683370190505b50905060005b825181101561137757611348868483815181106112e8576112e8615660565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b82828151811061135a5761135a615660565b60209081029190910101528061136f816156ce565b9150506112c9565b509094909350915050565b600061138c611418565b600481015490915074010000000000000000000000000000000000000000900460ff16611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610688565b50565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8526105f9565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d906114be60058401612c51565b14806114ce57506114ce84612c5b565b156114dd575060019392505050565b5060009392505050565b6114ef611382565b60006114f9611418565b90506115058585612d2e565b6000611510866124c7565b90508360000361157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f67616d652072616e6b206e6f74207370656369666965640000000000000000006044820152606401610688565b81541561163357600182015482546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015611606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162a919061568f565b50815460098201555b600181810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861617905560038301805460009061168a90849061564d565b9091555050838155600482015473ffffffffffffffffffffffffffffffffffffffff168063731133e93060016116c0898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b15801561174157600080fd5b505af1158015611755573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b5050505050505050505050565b60006118528360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905080600801546000148061187d575080600701548160060154611876919061564d565b8160080154145b611909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610688565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155611947600a82016000614ee9565b611955600b82016000614ee9565b611963600982016000614f07565b60005b826020015151811015611c7a5781600a018360200151828151811061198d5761198d615660565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b8401919083908110611a0c57611a0c615660565b602090810291909101810151810151825460018101845560009384529282902090920191909155830151805160098401919083908110611a4e57611a4e615660565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a918202191690836002811115611a9e57611a9e615706565b021790555082602001518181518110611ab957611ab9615660565b60200260200101516060015182600001600085602001518481518110611ae157611ae1615660565b6020026020010151604001516002811115611afe57611afe615706565b6002811115611b0f57611b0f615706565b8152602001908152602001600020600085602001518481518110611b3557611b35615660565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110611b9357611b93615660565b60209081029190910181015181015182528101919091526040016000208151805182908190611bc290826157ce565b50602091820151600190910155820151805160028301908190611be590826157ce565b50602091909101516001909101556040820151805160048301908190611c0b90826157ce565b50602091909101516001909101556060820151805160068301908190611c3190826157ce565b50602091909101516001909101556080820151805160088301908190611c5790826157ce565b506020820151816001015550509050508080611c72906156ce565b915050611966565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b611cb5828261302c565b60405173ffffffffffffffffffffffffffffffffffffffff82169083907fb2bd643202385c64d9814c6c3fa61b1ba098d6652292e9d9a6f1a0cdae6eb82490600090a35050565b6000611d06611418565b90508060020154600014611e0857600083611d22576001611d25565b60025b60ff1690506000818360020154611d3c91906158e8565b90506000611d49886124c7565b905081816009016000828254611d5f9190615923565b909155505060018401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e03919061568f565b505050505b611e12858561308d565b61105b85858463ffffffff16565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303611e84575060009392505050565b6003810154611e93904261564d565b826003015410611ea4576000611ea7565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090611eeb6005820161315a565b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206000611f2d82600501612c51565b826008015414611f3e576000611f41565b60015b600483015490915060ff161580611f5c5750611f5c84612432565b15611f6b575060009392505050565b80806114ce57506114ce84613167565b611f848261275c565b6000611f8f836124c7565b600181015490915073ffffffffffffffffffffffffffffffffffffffff83811691161461058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f720000000000000000000000000000006044820152606401610688565b600061202384611eaf565b905060005b8151811015612069576120578583838151811061204757612047615660565b6020026020010151600087611cfc565b80612061816156ce565b915050612028565b506000612075856124c7565b90506000612081611418565b905060006002826000015461209691906158e8565b600183810154908501546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b919061568f565b50808360090160008282546121509190615923565b9091555050600182015460098401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482019290925291169063a9059cbb906044016020604051808303816000875af11580156121d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f9919061568f565b506000600984015561220a876131db565b50505050505050565b61225b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60408051610100810182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d805482527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e5460208301527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f54928201929092527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f305460608201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460808201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f325460a08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f335460c08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f348054839160e08401916123aa90615735565b80601f01602080910402602001604051908101604052809291908181526020018280546123d690615735565b80156124235780601f106123f857610100808354040283529160200191612423565b820191906000526020600020905b81548152906001019060200180831161240657829003601f168201915b50505050508152505091505090565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156114ce5750600b81015460ff166114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a01548190611eeb565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d929190036114dd575060019392505050565b61258f81611e20565b1561261c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610688565b6126c081613446565b612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f67616d65206e6f7420666f756e640000000000000000000000000000000000006044820152606401610688565b60009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902042600390910155565b612764611382565b61276d81613446565b611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f737461727447616d652d3e616c726561647920737461727465640000000000006044820152606401610688565b8160030154600003612925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f737461727447616d652d3e47616d6520726567697374726174696f6e2077617360448201527f206e6f7420796574206f70656e000000000000000000000000000000000000006064820152608401610688565b8260000361298f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f737461727447616d652d3e47616d65206e6f7420666f756e64000000000000006044820152606401610688565b60028101546129a060058401612c51565b1015612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6001810154612a1960058401612c51565b1480612a37575060038082015490830154612a34919061564d565b42115b612a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6004820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660019081179091558281015542600283015561058e826134a2565b612ae98261275c565b612af38282613533565b6000612afd611418565b90508060020154600014612be257600181015460028201546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015612b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb5919061568f565b506000612bc1846124c7565b90508160020154816009016000828254612bdb919061564d565b9091555050505b61058e83836135e7565b6000612c418260408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050612c4d8133613886565b5050565b60006105f9825490565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612cc1575060009392505050565b8160030154600003612cd7575060009392505050565b83600003612ce9575060009392505050565b60038082015490830154612cfd919061564d565b4211612d0d575060009392505050565b6002810154612d1e60058401612c51565b1015611ea4575060009392505050565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d612d5883613446565b15612dbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63726561746547616d652d3e416c7265616479206578697374730000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216612e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746547616d652d3e474d0000000000000000000000000000000000006044820152606401610688565b82600003612ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b600083815260088201602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b6000838152600882016020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516179055600a8201805460019290612f9790849061564d565b9091555050600a8101546040805160208101869052908101919091527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d6060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009586526008909301909152909220600a019190915550565b60006130818360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061058e8183613920565b6130968261275c565b6130a082826139c3565b60006130aa611418565b905060006130b7846124c7565b905060018160000154111561315457805460048301546130ee91859173ffffffffffffffffffffffffffffffffffffffff16613bcf565b60005b600882015481101561105b5761314284836000015484600801848154811061311b5761311b615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613bcf565b8061314c816156ce565b9150506130f1565b50505050565b60606000611eeb83613c68565b60008061317383613cc4565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806131bc57506131bc84612432565b156131cb575060009392505050565b81156114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d916132366005830161315a565b905060005b8151811015613355576000846008016000878152602001908152602001600020600901600084848151811061327257613272615660565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600084600801600087815260200190815260200160002060070160008484815181106132e6576132e6615660565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061334d816156ce565b91505061323b565b506000848152600884016020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055600a8101829055600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556133fd91600c90910190614ee9565b60008481526008808501602052604082209081018290556005019081816134248282614ee9565b5050506000948552505050600801602052604081206003810182905560020155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff16156134995750600192915050565b50600092915050565b60005b6134b182600501612c51565b811015612c4d5760006134c76005840183613d5d565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560098601909152812055508061352b816156ce565b9150506134a5565b600061353d611418565b9050600061354a846124c7565b9050600181600001541115613154578054600483015461358191859173ffffffffffffffffffffffffffffffffffffffff16613d69565b60005b600882015481101561105b576135d58483600001548460080184815481106135ae576135ae615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613d69565b806135df816156ce565b915050613584565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d61361183613446565b613677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f616464506c617965722d3e696e76616c69642067616d650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090205415613706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f616464506c617965722d3e506c6179657220696e2067616d65000000000000006044820152606401610688565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020600182015461374460058301612c51565b106137ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464506c617965722d3e70617274792066756c6c00000000000000000000006044820152606401610688565b6137b484613dce565b61381a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f616464506c617965722d3e63616e74206a6f696e206e6f7700000000000000006044820152606401610688565b6138276005820184613e27565b5073ffffffffffffffffffffffffffffffffffffffff909216600090815260079092016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560099092019052902055565b600c82015460ff166138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f736974696f6e20646f6573206e6f742065786973740000000000000000006044820152606401610688565b613902828230303030613e49565b6001826008016000828254613917919061564d565b90915550505050565b816008015482600701548360060154613939919061564d565b106139a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656e6f7567682062616c616e636520746f20726566756e64000000006044820152606401610688565b6139ae823083848586613e49565b6001826006016000828254613917919061564d565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90613a1b84613446565b613a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009830160205260409020548414613b11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d6500000000000000000000000000000000006044820152606401610688565b600481015460ff161580613b345750600481015460ff6101009091041615156001145b613b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e63652073746172746564000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561105b60058201846141ed565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c68906064015b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613cb857602002820191906000526020600020905b815481526020019060010190808311613ca4575b50505050509050919050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9083600003613d2357613d23615936565b600481015460ff161515600114613d3c57613d3c615936565b60028101548254613d4d919061564d565b4211611ea4575060009392505050565b6000611eeb838361420f565b6040517fe2ab691d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063e2ab691d90606401613c30565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600481015460ff1680613e1057506003810154155b15613e1e5750600092915050565b50600192915050565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff8416614239565b3073ffffffffffffffffffffffffffffffffffffffff861603613fb357600286015415613eb857600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f19350505050158015613eb6573d6000803e3d6000fd5b505b600486015415613f0a57600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f19350505050158015613f08573d6000803e3d6000fd5b505b600586015415613f5c57600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f19350505050158015613f5a573d6000803e3d6000fd5b505b600386015415613fae57600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613fac573d6000803e3d6000fd5b505b614057565b60038601546005870154600488015460028901546000939291613fd59161564d565b613fdf919061564d565b613fe9919061564d565b905080341015614055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f770000000000000000000000000000006044820152606401610688565b505b60005b600a87015481101561220a57600087600a01828154811061407d5761407d615660565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff909216935090849081106140b9576140b9615660565b9060005260206000200154905060008960090184815481106140dd576140dd615660565b60009182526020808320908204015460ff601f9092166101000a90041691508a8183600281111561411057614110615706565b600281111561412157614121615706565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561417057614170615706565b036141895761418484828c8c8c8c8c614288565b6141d6565b600282600281111561419d5761419d615706565b036141ad5761418484828c61440b565b60018260028111156141c1576141c1615706565b036141d6576141d68484838d8d8d8d8d6145d6565b5050505080806141e5906156ce565b91505061405a565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff84166149bd565b600082600001828154811061422657614226615660565b9060005260206000200154905092915050565b6000818152600183016020526040812054614280575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f9565b5060006105f9565b61429b8786838960020160010154614ab0565b6142ae8786848960040160010154614ab0565b6142c18786868960060160010154614ab0565b6142d48786858960080160010154614ab0565b600186015487908015801590614300575073ffffffffffffffffffffffffffffffffffffffff87163014155b15614400576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015614374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143989190615965565b1015614400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e730000000000000000006044820152606401610688565b505050505050505050565b6003820154839015801561442157506005830154155b801561442f57506007830154155b801561443d57506009830154155b6144a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f7274656400006044820152606401610688565b6001830154158015906144cc575073ffffffffffffffffffffffffffffffffffffffff82163014155b15613154576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015614541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145659190615965565b600185015490915081101561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e6365000000000000006044820152606401610688565b6001860154889080156146ea576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa158015614658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061467c9190615965565b9050818110156146e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c6964000000006044820152606401610688565b505b5060078701548015614770578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b815260040161473d95949392919061597e565b600060405180830381600087803b15801561475757600080fd5b505af115801561476b573d6000803e3d6000fd5b505050505b50600987015480156147f6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b81526004016147c395949392919061597e565b600060405180830381600087803b1580156147dd57600080fd5b505af11580156147f1573d6000803e3d6000fd5b505050505b506005870154801561492b5773ffffffffffffffffffffffffffffffffffffffff84166148b1576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b15801561489457600080fd5b505af11580156148a8573d6000803e3d6000fd5b5050505061492b565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b81526004016148f895949392919061597e565b600060405180830381600087803b15801561491257600080fd5b505af1158015614926573d6000803e3d6000fd5b505050505b50600387015480156149b1578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b815260040161497e95949392919061597e565b600060405180830381600087803b15801561499857600080fd5b505af11580156149ac573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015614aa65760006149e1600183615923565b85549091506000906149f590600190615923565b9050818114614a5a576000866000018281548110614a1557614a15615660565b9060005260206000200154905080876000018481548110614a3857614a38615660565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6b57614a6b615a5f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f9565b60009150506105f9565b83811561105b573073ffffffffffffffffffffffffffffffffffffffff851603614c155773ffffffffffffffffffffffffffffffffffffffff831615614b90576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015614b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b8a919061568f565b5061105b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050505061105b565b73ffffffffffffffffffffffffffffffffffffffff831615614c94576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401614b47565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af1158015614d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d33919061568f565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614d9c57600080fd5b505af1158015614400573d6000803e3d6000fd5b6040518060400160405280614ded6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001606081525090565b6040518060400160405280614e0d614f2c565b8152602001614e5a60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b905290565b828054828255906000526020600020908101928215614ed9579160200282015b82811115614ed957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190614e7f565b50614ee5929150614fb3565b5090565b50805460008255906000526020600020908101906114159190614fb3565b50805460008255601f0160209004906000526020600020908101906114159190614fb3565b6040518060e0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001614e5a60405180606001604052806000815260200160008152602001600081525090565b5b80821115614ee55760008155600101614fb4565b600060208284031215614fda57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561502757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614ff5565b509495945050505050565b6040815260006150456040830185614fe1565b82810360208481019190915284518083528582019282019060005b8181101561507c57845183529383019391830191600101615060565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141557600080fd5b80356150b681615089565b919050565b600080604083850312156150ce57600080fd5b82356150d981615089565b946020939093013593505050565b60008083601f8401126150f957600080fd5b50813567ffffffffffffffff81111561511157600080fd5b60208301915083602082850101111561512957600080fd5b9250929050565b60008060008060006080868803121561514857600080fd5b853561515381615089565b9450602086013561516381615089565b935060408601359250606086013567ffffffffffffffff81111561518657600080fd5b615192888289016150e7565b969995985093965092949392505050565b6000806000606084860312156151b857600080fd5b83356151c381615089565b95602085013595506040909401359392505050565b602081526000611eeb6020830184614fe1565b6000610100825184526020808401518186015260408401516040860152606084015160608601526080840151608086015260a084015160a086015260c084015160c086015260e08401518260e087015280518084880152600093505b8084101561526657818401830151878501610120015292820192615247565b61012093506000848289010152837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011688010194505050505092915050565b602081526000825180516020840152602081015173ffffffffffffffffffffffffffffffffffffffff808216604086015260408301516060860152606083015160808601528060808401511660a0860152505060a0810151151560c084015260c08101519050805160e084015260208101516101008401526040810151610120840152506020830151610140808185015250611ea76101608401826151eb565b60008083601f84011261535b57600080fd5b50813567ffffffffffffffff81111561537357600080fd5b6020830191508360208260051b850101111561512957600080fd5b60008060008060008060008060a0898b0312156153aa57600080fd5b88356153b581615089565b975060208901356153c581615089565b9650604089013567ffffffffffffffff808211156153e257600080fd5b6153ee8c838d01615349565b909850965060608b013591508082111561540757600080fd5b6154138c838d01615349565b909650945060808b013591508082111561542c57600080fd5b506154398b828c016150e7565b999c989b5096995094979396929594505050565b60006020828403121561545f57600080fd5b8135611eeb81615089565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080608085870312156154af57600080fd5b84356154ba81615089565b9350602085810135935060408601359250606086013567ffffffffffffffff808211156154e657600080fd5b818801915088601f8301126154fa57600080fd5b81358181111561550c5761550c61546a565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561554f5761554f61546a565b60405291825284820192508381018501918b83111561556d57600080fd5b938501935b8285101561559257615583856150ab565b84529385019392850192615572565b989b979a50959850505050505050565b60008060008060008060a087890312156155bb57600080fd5b86356155c681615089565b955060208701356155d681615089565b94506040870135935060608701359250608087013567ffffffffffffffff81111561560057600080fd5b61560c89828a016150e7565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156156a157600080fd5b81518015158114611eeb57600080fd5b6000602082840312156156c357600080fd5b8151611eeb81615089565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036156ff576156ff61561e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181811c9082168061574957607f821691505b602082108103615782577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561058e57600081815260208120601f850160051c810160208610156157af5750805b601f850160051c820191505b81811015611059578281556001016157bb565b815167ffffffffffffffff8111156157e8576157e861546a565b6157fc816157f68454615735565b84615788565b602080601f83116001811461584f57600084156158195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611059565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561589c5788860151825594840194600190910190840161587d565b50858210156158d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008261591e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60006020828403121561597757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a060808501526000915084546159c581615735565b8060a087015260c06001808416600081146159e75760018114615a1f57615a4d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650615a4d565b896000528560002060005b85811015615a455781548b8201860152908301908701615a2a565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f004b5565099d976a1bf33745fd656bdc1dea4e19fcdbee683b04d21eb1b38f064736f6c63430008140033", + "numDeployments": 1, + "solcInputHash": "950621027b9d5cffdabde867c6602559", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"GameClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"GameStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"}],\"name\":\"PlayerJoined\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"PlayerLeft\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameid\",\"type\":\"uint256\"}],\"name\":\"RegistrationOpen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"gm\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rank\",\"type\":\"uint256\"}],\"name\":\"gameCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"canEndTurn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"canStartGame\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"cancelGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"gameMaster\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gameRank\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"additionalRanks\",\"type\":\"address[]\"}],\"name\":\"createGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"gameCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getContractState\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"gamePrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gamePaymentToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"joinGamePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numGames\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rankTokenAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"contractInitialized\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxQuadraticPoints\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuadraticPositons\",\"type\":\"uint256\"}],\"internalType\":\"struct LibQuadraticVoting.qVotingStruct\",\"name\":\"voting\",\"type\":\"tuple\"}],\"internalType\":\"struct IRankifyInstanceCommons.RInstanceSettings\",\"name\":\"BestOfState\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timePerTurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minPlayersSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeToJoin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTurns\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numWinners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"voteCredits\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"subject\",\"type\":\"string\"}],\"internalType\":\"struct LibTBG.GameSettings\",\"name\":\"TBGSEttings\",\"type\":\"tuple\"}],\"internalType\":\"struct IRankifyInstanceCommons.RInstanceState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getGM\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getGameRank\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getPlayers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"getPlayersGame\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getScores\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getTurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isGameOver\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isLastTurn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isOvertime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"isRegistrationOpen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"joinGame\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"leaveGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"openRegistration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"startGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelGame(uint256)\":{\"details\":\"Cancels a game with the provided game ID. `gameId` is the ID of the game. Modifies: - Calls the `enforceIsGameCreator` function with `msg.sender`. Requirements: - The caller must be the game creator of the game with `gameId`. - Game must not be started.\"},\"createGame(address,uint256,uint256)\":{\"details\":\"Creates a new game with the provided game master, game ID, and game rank. Optionally, additional ranks can be provided. `gameMaster` is the address of the game master. `gameId` is the ID of the new game. `gameRank` is the rank of the new game. `additionalRanks` is the array of additional ranks. emits a _GameCreated_ event. Requirements: There are some game price requirments that must be met under gameId.newGame function that are set during the contract initialization and refer to the contract maintainer benefits. Modifies: - Calls the `newGame` function with `gameMaster`, `gameRank`, and `msg.sender`. - Configures the coin vending with `gameId` and an empty configuration. - If `additionalRanks` is not empty, mints rank tokens for each additional rank and sets the additional ranks of the game with `gameId` to `additionalRanks`.\"},\"joinGame(uint256)\":{\"details\":\"Allows a player to join a game with the provided game ID. `gameId` is the ID of the game. emits a _PlayerJoined_ event. Modifies: - Calls the `joinGame` function with `msg.sender`. - Calls the `fund` function with `bytes32(gameId)`. Requirements: - The caller must not be a player in the game with `gameId`. - Game phase must be registration. - Caller must be able to fulfill funding requirements.\"},\"leaveGame(uint256)\":{\"details\":\"Allows a player to leave a game with the provided game ID. `gameId` is the ID of the game. Modifies: - Calls the `quitGame` function with `msg.sender`, `true`, and `onPlayerQuit`. Requirements: - The caller must be a player in the game with `gameId`. - Game must not be started.\"},\"openRegistration(uint256)\":{\"details\":\"Opens registration for a game with the provided game ID. `gameId` is the ID of the game. emits a _RegistrationOpen_ event. Modifies: - Calls the `enforceIsGameCreator` function with `msg.sender`. - Calls the `enforceIsPreRegistrationStage` function. - Calls the `openRegistration` function. Requirements: - The caller must be the game creator of the game with `gameId`. - The game with `gameId` must be in the pre-registration stage.\"},\"startGame(uint256)\":{\"details\":\"Starts a game with the provided game ID early. `gameId` is the ID of the game. emits a _GameStarted_ event. Modifies: - Calls the `enforceGameExists` function. - Calls the `startGameEarly` function. Requirements: - The game with `gameId` must exist.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceMainFacet.sol\":\"RankifyInstanceMainFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../../interfaces/IERC1271.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureChecker {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\\n return\\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x3af3ca86df39aac39a0514c84459d691434a108d2151c8ce9d69f32e315cab80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/abstracts/DiamondReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/**\\n * Author: @Peersky https://github.com/peersky\\n * Adapted this diamond reentrancy guard from:\\n\\n * Authors: Moonstream Engineering (engineering@moonstream.to)\\n * GitHub: https://github.com/bugout-dev/dao\\n */\\n\\npragma solidity ^0.8.20;\\nimport \\\"../libraries/LibReentrancyGuard.sol\\\";\\n\\nabstract contract DiamondReentrancyGuard {\\n modifier nonReentrant() {\\n LibReentrancyGuard.ReentrancyGuardStruct storage rgs = LibReentrancyGuard.reentrancyGuardStorage();\\n require(!rgs._entered, \\\"REG: You shall not pass!\\\");\\n rgs._entered = true;\\n _;\\n rgs._entered = false;\\n }\\n}\\n\",\"keccak256\":\"0xfe1f8e71dc63f898ba9ae59193b975352955e0f8c1a694a78cab07df3389cd91\",\"license\":\"Apache-2.0\"},\"src/abstracts/draft-EIP712Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/LibEIP712Storage.sol\\\";\\nimport \\\"../modifiers/OnlyOwnerDiamond.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 is OnlyOwnerDiamond {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor() {}\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\\n return ss._CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\\n\",\"keccak256\":\"0x26b10c662581738d0d65e4df162d8355785d08913a3e939772894578039f1a54\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceMainFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\n\\nimport {IERC1155Receiver} from \\\"../interfaces/IERC1155Receiver.sol\\\";\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport \\\"../abstracts/DiamondReentrancyGuard.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../abstracts/draft-EIP712Diamond.sol\\\";\\n\\nimport \\\"hardhat/console.sol\\\";\\n\\ncontract RankifyInstanceMainFacet is\\n IRankifyInstanceCommons,\\n IERC1155Receiver,\\n DiamondReentrancyGuard,\\n IERC721Receiver,\\n EIP712\\n{\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibRankify for uint256;\\n\\n function RInstanceStorage() internal pure returns (RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game master, game ID, and game rank. Optionally, additional ranks can be provided. `gameMaster` is the address of the game master. `gameId` is the ID of the new game. `gameRank` is the rank of the new game. `additionalRanks` is the array of additional ranks.\\n *\\n * emits a _GameCreated_ event.\\n *\\n * Requirements:\\n * There are some game price requirments that must be met under gameId.newGame function that are set during the contract initialization and refer to the contract maintainer benefits.\\n *\\n * Modifies:\\n *\\n * - Calls the `newGame` function with `gameMaster`, `gameRank`, and `msg.sender`.\\n * - Configures the coin vending with `gameId` and an empty configuration.\\n * - If `additionalRanks` is not empty, mints rank tokens for each additional rank and sets the additional ranks of the game with `gameId` to `additionalRanks`.\\n */\\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank) public nonReentrant {\\n gameId.newGame(gameMaster, gameRank, msg.sender);\\n LibCoinVending.ConfigPosition memory emptyConfig;\\n LibCoinVending.configure(bytes32(gameId), emptyConfig);\\n emit gameCreated(gameId, gameMaster, msg.sender, gameRank);\\n }\\n\\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank, address[] memory additionalRanks) public {\\n createGame(gameMaster, gameId, gameRank);\\n RInstance storage game = gameId.getGameStorage();\\n if (additionalRanks.length != 0) {\\n for (uint256 i = 0; i < additionalRanks.length; i++) {\\n IRankToken additonalRank = IRankToken(additionalRanks[i]);\\n require(additonalRank.supportsInterface(type(IRankToken).interfaceId), \\\"must support rank interface\\\");\\n require(additonalRank.getRankingInstance() == address(this), \\\"must be rankingInstance\\\");\\n additonalRank.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n additonalRank.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n game.additionalRanks = additionalRanks;\\n }\\n }\\n\\n function createGame(address gameMaster, uint256 gameRank) public {\\n LibRankify.enforceIsInitialized();\\n RInstanceSettings storage settings = RInstanceStorage();\\n createGame(gameMaster, settings.numGames + 1, gameRank);\\n }\\n\\n /**\\n * @dev Handles a player quitting a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * emits a _PlayerLeft_ event.\\n *\\n * Modifies:\\n *\\n * - Refunds the coins for `player` in the game with `gameId`.\\n */\\n function onPlayerQuit(uint256 gameId, address player) private {\\n LibCoinVending.refund(bytes32(gameId), player);\\n emit PlayerLeft(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\\n *\\n * Requirements:\\n *\\n * - The caller must be the game creator of the game with `gameId`.\\n * - Game must not be started.\\n */\\n function cancelGame(uint256 gameId) public nonReentrant {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.cancelGame(onPlayerQuit, LibDiamond.contractOwner());\\n emit GameClosed(gameId);\\n }\\n\\n /**\\n * @dev Allows a player to leave a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Calls the `quitGame` function with `msg.sender`, `true`, and `onPlayerQuit`.\\n *\\n * Requirements:\\n *\\n * - The caller must be a player in the game with `gameId`.\\n * - Game must not be started.\\n */\\n function leaveGame(uint256 gameId) public nonReentrant {\\n gameId.quitGame(msg.sender, true, onPlayerQuit);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * emits a _RegistrationOpen_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\\n * - Calls the `enforceIsPreRegistrationStage` function.\\n * - Calls the `openRegistration` function.\\n *\\n * Requirements:\\n *\\n * - The caller must be the game creator of the game with `gameId`.\\n * - The game with `gameId` must be in the pre-registration stage.\\n */\\n function openRegistration(uint256 gameId) public {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.enforceIsPreRegistrationStage();\\n gameId.openRegistration();\\n emit RegistrationOpen(gameId);\\n }\\n\\n /**\\n * @dev Allows a player to join a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * emits a _PlayerJoined_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `joinGame` function with `msg.sender`.\\n * - Calls the `fund` function with `bytes32(gameId)`.\\n *\\n * Requirements:\\n *\\n * - The caller must not be a player in the game with `gameId`.\\n * - Game phase must be registration.\\n * - Caller must be able to fulfill funding requirements.\\n */\\n function joinGame(uint256 gameId) public payable nonReentrant {\\n gameId.joinGame(msg.sender);\\n LibCoinVending.fund(bytes32(gameId));\\n emit PlayerJoined(gameId, msg.sender);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n *\\n * emits a _GameStarted_ event.\\n *\\n * Modifies:\\n *\\n * - Calls the `enforceGameExists` function.\\n * - Calls the `startGameEarly` function.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function startGame(uint256 gameId) public {\\n gameId.enforceGameExists();\\n gameId.startGameEarly();\\n emit GameStarted(gameId);\\n }\\n\\n function onERC1155Received(\\n address operator,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) public view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"));\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function onERC1155BatchReceived(\\n address operator,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"));\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function onERC721Received(\\n address operator,\\n address,\\n uint256,\\n bytes calldata\\n ) external view override returns (bytes4) {\\n LibRankify.enforceIsInitialized();\\n if (operator == address(this)) {\\n return IERC721Receiver.onERC721Received.selector;\\n }\\n return bytes4(\\\"\\\");\\n }\\n\\n function getContractState() public view returns (RInstanceState memory) {\\n RInstanceSettings storage settings = RInstanceStorage();\\n LibTBG.GameSettings memory tbgSettings = LibTBG.getGameSettings();\\n return (RInstanceState({BestOfState: settings, TBGSEttings: tbgSettings}));\\n }\\n\\n function getTurn(uint256 gameId) public view returns (uint256) {\\n return gameId.getTurn();\\n }\\n\\n function getGM(uint256 gameId) public view returns (address) {\\n return gameId.getGM();\\n }\\n\\n function getScores(uint256 gameId) public view returns (address[] memory, uint256[] memory) {\\n return gameId.getScores();\\n }\\n\\n function isOvertime(uint256 gameId) public view returns (bool) {\\n return gameId.isOvertime();\\n }\\n\\n function isGameOver(uint256 gameId) public view returns (bool) {\\n return gameId.isGameOver();\\n }\\n\\n function getPlayersGame(address player) public view returns (uint256) {\\n return LibTBG.getPlayersGame(player);\\n }\\n\\n function isLastTurn(uint256 gameId) public view returns (bool) {\\n return gameId.isLastTurn();\\n }\\n\\n function isRegistrationOpen(uint256 gameId) public view returns (bool) {\\n return gameId.isRegistrationOpen();\\n }\\n\\n function gameCreator(uint256 gameId) public view returns (address) {\\n return gameId.getGameStorage().createdBy;\\n }\\n\\n function getGameRank(uint256 gameId) public view returns (uint256) {\\n return gameId.getGameStorage().rank;\\n }\\n\\n function getPlayers(uint256 gameId) public view returns (address[] memory) {\\n return gameId.getPlayers();\\n }\\n\\n function canStartGame(uint256 gameId) public view returns (bool) {\\n return gameId.canStartEarly();\\n }\\n\\n function canEndTurn(uint256 gameId) public view returns (bool) {\\n return gameId.canEndTurnEarly();\\n }\\n}\\n\",\"keccak256\":\"0xbed4cccf43d44891f7f9e06197c116cfa9ecad2454f5da6f2ab74f55d6f42348\",\"license\":\"MIT\"},\"src/interfaces/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @title ERC1155 transfer receiver interface\\n */\\ninterface IERC1155Receiver {\\n /**\\n * @notice validate receipt of ERC1155 transfer\\n * @param operator executor of transfer\\n * @param from sender of tokens\\n * @param id token ID received\\n * @param value quantity of tokens received\\n * @param data data payload\\n * @return function's own selector if transfer is accepted\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @notice validate receipt of ERC1155 batch transfer\\n * @param operator executor of transfer\\n * @param from sender of tokens\\n * @param ids token IDs received\\n * @param values quantities of tokens received\\n * @param data data payload\\n * @return function's own selector if transfer is accepted\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa27ad77bced0575dc3a3e4eb8f334a4889f16e5cae2053272676ff69ca9379e2\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibEIP712Storage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport {IDiamondCut} from \\\"../vendor/interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibEIP712WithStorage {\\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\\\"EIP.712.STORAGE.POSITION\\\");\\n\\n struct LibEIP712WithStorageStorage {\\n bytes32 _CACHED_DOMAIN_SEPARATOR;\\n uint256 _CACHED_CHAIN_ID;\\n address _CACHED_THIS;\\n bytes32 _HASHED_NAME;\\n bytes32 _HASHED_VERSION;\\n bytes32 _TYPE_HASH;\\n }\\n\\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\\n bytes32 position = EIP712_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x630caa1a57dddf5e609dc42a371b4c17c9544a6100e4018bbfd257e6bf91b5d5\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n// import \\\"./LibDiamondOwner.sol\\\";\\n// import { IMultipass } from \\\"../interfaces/sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\nlibrary LibReentrancyGuard {\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"reentrancyguard.storage.position\\\");\\n\\n struct ReentrancyGuardStruct {\\n bool _entered;\\n }\\n\\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef038fdedc9d4857f9f190562c07849c9813fd4ae927a4e81cef94a29a3f5ed\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x9e5c01321d4e1f9102bd4638b5fc168a3aecae7d04de267838ca04848bebd81a\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"},\"src/modifiers/OnlyOwnerDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"../vendor/libraries/LibDiamond.sol\\\";\\n\\n// import \\\"./interfaces/IERC173.sol\\\";\\n\\ncontract OnlyOwnerDiamond {\\n modifier onlyOwner() {\\n LibDiamond.enforceIsContractOwner();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x998a3e35ca9f029367850b6f69be6a8ec98f26e1c7772d7958b918cea6a8dc26\",\"license\":\"MIT\"},\"src/vendor/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\n/******************************************************************************\\\\\\n* Adapted from\\n* Author: Nick Mudge (https://twitter.com/mudgen)\\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\\n/******************************************************************************/\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x238f7bcdbbedfac48b94cbc9d4a15e16fb5c9c09fb41a8c72e2a7ff48c81f24b\",\"license\":\"MIT\"},\"src/vendor/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\\n// https://github.com/mudgen/diamond-3-hardhat\\n\\nimport {IDiamondCut} from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x4b729c72650a32af6dddb4bb743488bf477770252cf84d5660e78f49164b35b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50615ac480620000216000396000f3fe6080604052600436106101965760003560e01c80639637460e116100e1578063bfa640361161008a578063e5ed1d5911610064578063e5ed1d59146104d7578063efaa55a0146104f7578063f23a6e611461050a578063f72ea4671461052a57600080fd5b8063bfa6403614610477578063cca84a0c14610497578063e240ae5f146104b757600080fd5b8063b55991c0116100bb578063b55991c014610417578063b881cffe14610437578063bc197c811461045757600080fd5b80639637460e146103845780639a214b1e146103a4578063aee5f34a146103d257600080fd5b80634024ba751161014357806369958ab91161011d57806369958ab9146103225780637f4e4849146103425780638eed01f81461036457600080fd5b80634024ba75146102b5578063460e2049146102d557806358759df71461030257600080fd5b8063392b749c11610174578063392b749c146102455780633b17469e146102755780633feef58a1461029557600080fd5b806304527d901461019b57806307ead930146101d2578063150b7a02146101f4575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004614fc8565b61054a565b6040516101c9929190615032565b60405180910390f35b3480156101de57600080fd5b506101f26101ed3660046150bb565b61055f565b005b34801561020057600080fd5b5061021461020f366004615130565b610593565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101c9565b34801561025157600080fd5b50610265610260366004614fc8565b6105ee565b60405190151581526020016101c9565b34801561028157600080fd5b506101f26102903660046151a3565b6105ff565b3480156102a157600080fd5b506101f26102b0366004614fc8565b61076c565b3480156102c157600080fd5b506102656102d0366004614fc8565b61085d565b3480156102e157600080fd5b506102f56102f0366004614fc8565b610868565b6040516101c991906151d8565b34801561030e57600080fd5b5061026561031d366004614fc8565b610873565b34801561032e57600080fd5b506101f261033d366004614fc8565b61087e565b34801561034e57600080fd5b506103576109de565b6040516101c991906152a9565b34801561037057600080fd5b5061026561037f366004614fc8565b610ab8565b34801561039057600080fd5b5061026561039f366004614fc8565b610ac3565b3480156103b057600080fd5b506103c46103bf366004614fc8565b610afc565b6040519081526020016101c9565b3480156103de57600080fd5b506103f26103ed366004614fc8565b610b0e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c9565b34801561042357600080fd5b506103c4610432366004614fc8565b610b39565b34801561044357600080fd5b50610265610452366004614fc8565b610b6f565b34801561046357600080fd5b5061021461047236600461538e565b610b7a565b34801561048357600080fd5b506103c461049236600461544d565b610bd8565b3480156104a357600080fd5b506101f26104b2366004614fc8565b610c22565b3480156104c357600080fd5b506101f26104d2366004615499565b610c6c565b3480156104e357600080fd5b506101f26104f2366004614fc8565b611062565b6101f2610505366004614fc8565b6110a2565b34801561051657600080fd5b506102146105253660046155a2565b6111c9565b34801561053657600080fd5b506103f2610545366004614fc8565b611225565b6060806105568361126e565b91509150915091565b610567611382565b6000610571611418565b905061058e8382600301546001610588919061564d565b846105ff565b505050565b600061059d611382565b3073ffffffffffffffffffffffffffffffffffffffff8716036105e157507f150b7a02000000000000000000000000000000000000000000000000000000006105e5565b5060005b95945050505050565b60006105f982611441565b92915050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff1615610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f74207061737321000000000000000060448201526064015b60405180910390fd5b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556106c6838584336114e7565b6106ce614db0565b6106d884826117fd565b823373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f48f48f6273652830aa3718ca489b3d13c244a7215c70bab5c5c2f523aba583b68760405161073891815260200190565b60405180910390a45080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff16156107f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782556108349083903390611cab611cfc565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006105f982611e20565b60606105f982611eaf565b60006105f982611ef2565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815561093e8233611f7b565b61098a611cab6109827fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b849190612018565b60405182907f71f4c9aec1b2c51302bcaf09a3f4985709759853536445493905081899603a2190600090a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b6109e6614dfa565b60006109f0611418565b905060006109fc612213565b60408051610120810182528454818301908152600186015473ffffffffffffffffffffffffffffffffffffffff90811660608085019190915260028801546080850152600388015460a0850152600488015491821660c08501527401000000000000000000000000000000000000000090910460ff16151560e084015283519081018452600587015481526006870154602080830191909152600790970154938101939093526101008201929092529081529283015250919050565b60006105f982612432565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600b015460ff166105f9565b6000610b07826124c7565b5492915050565b6000610b19826124c7565b6001015473ffffffffffffffffffffffffffffffffffffffff1692915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101546105f9565b60006105f9826124ff565b6000610b84611382565b3073ffffffffffffffffffffffffffffffffffffffff8a1603610bc857507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621610bcc565b5060005b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120546105f9565b610c2c8133611f7b565b610c3581612586565b610c3e816126b7565b60405181907f5da9fef10786347975dd7cc4fc53417cff6969b0f7a9b6763169306c8cbeb63690600090a250565b610c778484846105ff565b6000610c82846124c7565b9050815160001461105b5760005b8251811015611043576000838281518110610cad57610cad615660565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290915073ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d69919061568f565b610dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d75737420737570706f72742072616e6b20696e7465726661636500000000006044820152606401610688565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16635c87c8f96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5591906156b1565b73ffffffffffffffffffffffffffffffffffffffff1614610ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d7573742062652072616e6b696e67496e7374616e63650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff811663731133e9306001610efb898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b5050505050808061103b906156ce565b915050610c90565b5081516110599060088301906020850190614e5f565b505b5050505050565b61106b8161275c565b611074816127d3565b60405181907f50ad08f58a27f2851d7e3a1b3a6a46b290f2ce677e99642d30ff639721e7779090600090a250565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556111628233612ae0565b61116b82612bec565b60405133815282907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006111d3611382565b3073ffffffffffffffffffffffffffffffffffffffff88160361121757507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9761121b565b5060005b9695505050505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081205473ffffffffffffffffffffffffffffffffffffffff166105f9565b606080600061127c84611eaf565b90506000815167ffffffffffffffff81111561129a5761129a61546a565b6040519080825280602002602001820160405280156112c3578160200160208202803683370190505b50905060005b825181101561137757611348868483815181106112e8576112e8615660565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b82828151811061135a5761135a615660565b60209081029190910101528061136f816156ce565b9150506112c9565b509094909350915050565b600061138c611418565b600481015490915074010000000000000000000000000000000000000000900460ff16611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610688565b50565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8526105f9565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d906114be60058401612c51565b14806114ce57506114ce84612c5b565b156114dd575060019392505050565b5060009392505050565b6114ef611382565b60006114f9611418565b90506115058585612d2e565b6000611510866124c7565b90508360000361157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f67616d652072616e6b206e6f74207370656369666965640000000000000000006044820152606401610688565b81541561163357600182015482546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015611606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162a919061568f565b50815460098201555b600181810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861617905560038301805460009061168a90849061564d565b9091555050838155600482015473ffffffffffffffffffffffffffffffffffffffff168063731133e93060016116c0898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b15801561174157600080fd5b505af1158015611755573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b5050505050505050505050565b60006118528360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905080600801546000148061187d575080600701548160060154611876919061564d565b8160080154145b611909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610688565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155611947600a82016000614ee9565b611955600b82016000614ee9565b611963600982016000614f07565b60005b826020015151811015611c7a5781600a018360200151828151811061198d5761198d615660565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b8401919083908110611a0c57611a0c615660565b602090810291909101810151810151825460018101845560009384529282902090920191909155830151805160098401919083908110611a4e57611a4e615660565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a918202191690836002811115611a9e57611a9e615706565b021790555082602001518181518110611ab957611ab9615660565b60200260200101516060015182600001600085602001518481518110611ae157611ae1615660565b6020026020010151604001516002811115611afe57611afe615706565b6002811115611b0f57611b0f615706565b8152602001908152602001600020600085602001518481518110611b3557611b35615660565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110611b9357611b93615660565b60209081029190910181015181015182528101919091526040016000208151805182908190611bc290826157ce565b50602091820151600190910155820151805160028301908190611be590826157ce565b50602091909101516001909101556040820151805160048301908190611c0b90826157ce565b50602091909101516001909101556060820151805160068301908190611c3190826157ce565b50602091909101516001909101556080820151805160088301908190611c5790826157ce565b506020820151816001015550509050508080611c72906156ce565b915050611966565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b611cb5828261302c565b60405173ffffffffffffffffffffffffffffffffffffffff82169083907fb2bd643202385c64d9814c6c3fa61b1ba098d6652292e9d9a6f1a0cdae6eb82490600090a35050565b6000611d06611418565b90508060020154600014611e0857600083611d22576001611d25565b60025b60ff1690506000818360020154611d3c91906158e8565b90506000611d49886124c7565b905081816009016000828254611d5f9190615923565b909155505060018401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e03919061568f565b505050505b611e12858561308d565b61105b85858463ffffffff16565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303611e84575060009392505050565b6003810154611e93904261564d565b826003015410611ea4576000611ea7565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090611eeb6005820161315a565b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206000611f2d82600501612c51565b826008015414611f3e576000611f41565b60015b600483015490915060ff161580611f5c5750611f5c84612432565b15611f6b575060009392505050565b80806114ce57506114ce84613167565b611f848261275c565b6000611f8f836124c7565b600181015490915073ffffffffffffffffffffffffffffffffffffffff83811691161461058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f720000000000000000000000000000006044820152606401610688565b600061202384611eaf565b905060005b8151811015612069576120578583838151811061204757612047615660565b6020026020010151600087611cfc565b80612061816156ce565b915050612028565b506000612075856124c7565b90506000612081611418565b905060006002826000015461209691906158e8565b600183810154908501546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b919061568f565b50808360090160008282546121509190615923565b9091555050600182015460098401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482019290925291169063a9059cbb906044016020604051808303816000875af11580156121d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f9919061568f565b506000600984015561220a876131db565b50505050505050565b61225b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60408051610100810182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d805482527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e5460208301527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f54928201929092527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f305460608201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460808201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f325460a08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f335460c08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f348054839160e08401916123aa90615735565b80601f01602080910402602001604051908101604052809291908181526020018280546123d690615735565b80156124235780601f106123f857610100808354040283529160200191612423565b820191906000526020600020905b81548152906001019060200180831161240657829003601f168201915b50505050508152505091505090565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156114ce5750600b81015460ff166114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a01548190611eeb565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d929190036114dd575060019392505050565b61258f81611e20565b1561261c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610688565b6126c081613446565b612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f67616d65206e6f7420666f756e640000000000000000000000000000000000006044820152606401610688565b60009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902042600390910155565b612764611382565b61276d81613446565b611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f737461727447616d652d3e616c726561647920737461727465640000000000006044820152606401610688565b8160030154600003612925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f737461727447616d652d3e47616d6520726567697374726174696f6e2077617360448201527f206e6f7420796574206f70656e000000000000000000000000000000000000006064820152608401610688565b8260000361298f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f737461727447616d652d3e47616d65206e6f7420666f756e64000000000000006044820152606401610688565b60028101546129a060058401612c51565b1015612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6001810154612a1960058401612c51565b1480612a37575060038082015490830154612a34919061564d565b42115b612a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6004820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660019081179091558281015542600283015561058e826134a2565b612ae98261275c565b612af38282613533565b6000612afd611418565b90508060020154600014612be257600181015460028201546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015612b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb5919061568f565b506000612bc1846124c7565b90508160020154816009016000828254612bdb919061564d565b9091555050505b61058e83836135e7565b6000612c418260408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050612c4d8133613886565b5050565b60006105f9825490565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612cc1575060009392505050565b8160030154600003612cd7575060009392505050565b83600003612ce9575060009392505050565b60038082015490830154612cfd919061564d565b4211612d0d575060009392505050565b6002810154612d1e60058401612c51565b1015611ea4575060009392505050565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d612d5883613446565b15612dbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63726561746547616d652d3e416c7265616479206578697374730000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216612e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746547616d652d3e474d0000000000000000000000000000000000006044820152606401610688565b82600003612ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b600083815260088201602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b6000838152600882016020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516179055600a8201805460019290612f9790849061564d565b9091555050600a8101546040805160208101869052908101919091527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d6060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009586526008909301909152909220600a019190915550565b60006130818360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061058e8183613920565b6130968261275c565b6130a082826139c3565b60006130aa611418565b905060006130b7846124c7565b905060018160000154111561315457805460048301546130ee91859173ffffffffffffffffffffffffffffffffffffffff16613bcf565b60005b600882015481101561105b5761314284836000015484600801848154811061311b5761311b615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613bcf565b8061314c816156ce565b9150506130f1565b50505050565b60606000611eeb83613c68565b60008061317383613cc4565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806131bc57506131bc84612432565b156131cb575060009392505050565b81156114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d916132366005830161315a565b905060005b8151811015613355576000846008016000878152602001908152602001600020600901600084848151811061327257613272615660565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600084600801600087815260200190815260200160002060070160008484815181106132e6576132e6615660565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061334d816156ce565b91505061323b565b506000848152600884016020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055600a8101829055600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556133fd91600c90910190614ee9565b60008481526008808501602052604082209081018290556005019081816134248282614ee9565b5050506000948552505050600801602052604081206003810182905560020155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff16156134995750600192915050565b50600092915050565b60005b6134b182600501612c51565b811015612c4d5760006134c76005840183613d5d565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560098601909152812055508061352b816156ce565b9150506134a5565b600061353d611418565b9050600061354a846124c7565b9050600181600001541115613154578054600483015461358191859173ffffffffffffffffffffffffffffffffffffffff16613d69565b60005b600882015481101561105b576135d58483600001548460080184815481106135ae576135ae615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613d69565b806135df816156ce565b915050613584565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d61361183613446565b613677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f616464506c617965722d3e696e76616c69642067616d650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090205415613706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f616464506c617965722d3e506c6179657220696e2067616d65000000000000006044820152606401610688565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020600182015461374460058301612c51565b106137ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464506c617965722d3e70617274792066756c6c00000000000000000000006044820152606401610688565b6137b484613dce565b61381a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f616464506c617965722d3e63616e74206a6f696e206e6f7700000000000000006044820152606401610688565b6138276005820184613e27565b5073ffffffffffffffffffffffffffffffffffffffff909216600090815260079092016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560099092019052902055565b600c82015460ff166138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f736974696f6e20646f6573206e6f742065786973740000000000000000006044820152606401610688565b613902828230303030613e49565b6001826008016000828254613917919061564d565b90915550505050565b816008015482600701548360060154613939919061564d565b106139a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656e6f7567682062616c616e636520746f20726566756e64000000006044820152606401610688565b6139ae823083848586613e49565b6001826006016000828254613917919061564d565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90613a1b84613446565b613a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009830160205260409020548414613b11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d6500000000000000000000000000000000006044820152606401610688565b600481015460ff161580613b345750600481015460ff6101009091041615156001145b613b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e63652073746172746564000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561105b60058201846141ed565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c68906064015b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613cb857602002820191906000526020600020905b815481526020019060010190808311613ca4575b50505050509050919050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9083600003613d2357613d23615936565b600481015460ff161515600114613d3c57613d3c615936565b60028101548254613d4d919061564d565b4211611ea4575060009392505050565b6000611eeb838361420f565b6040517fe2ab691d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063e2ab691d90606401613c30565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600481015460ff1680613e1057506003810154155b15613e1e5750600092915050565b50600192915050565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff8416614239565b3073ffffffffffffffffffffffffffffffffffffffff861603613fb357600286015415613eb857600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f19350505050158015613eb6573d6000803e3d6000fd5b505b600486015415613f0a57600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f19350505050158015613f08573d6000803e3d6000fd5b505b600586015415613f5c57600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f19350505050158015613f5a573d6000803e3d6000fd5b505b600386015415613fae57600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613fac573d6000803e3d6000fd5b505b614057565b60038601546005870154600488015460028901546000939291613fd59161564d565b613fdf919061564d565b613fe9919061564d565b905080341015614055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f770000000000000000000000000000006044820152606401610688565b505b60005b600a87015481101561220a57600087600a01828154811061407d5761407d615660565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff909216935090849081106140b9576140b9615660565b9060005260206000200154905060008960090184815481106140dd576140dd615660565b60009182526020808320908204015460ff601f9092166101000a90041691508a8183600281111561411057614110615706565b600281111561412157614121615706565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561417057614170615706565b036141895761418484828c8c8c8c8c614288565b6141d6565b600282600281111561419d5761419d615706565b036141ad5761418484828c61440b565b60018260028111156141c1576141c1615706565b036141d6576141d68484838d8d8d8d8d6145d6565b5050505080806141e5906156ce565b91505061405a565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff84166149bd565b600082600001828154811061422657614226615660565b9060005260206000200154905092915050565b6000818152600183016020526040812054614280575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f9565b5060006105f9565b61429b8786838960020160010154614ab0565b6142ae8786848960040160010154614ab0565b6142c18786868960060160010154614ab0565b6142d48786858960080160010154614ab0565b600186015487908015801590614300575073ffffffffffffffffffffffffffffffffffffffff87163014155b15614400576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015614374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143989190615965565b1015614400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e730000000000000000006044820152606401610688565b505050505050505050565b6003820154839015801561442157506005830154155b801561442f57506007830154155b801561443d57506009830154155b6144a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f7274656400006044820152606401610688565b6001830154158015906144cc575073ffffffffffffffffffffffffffffffffffffffff82163014155b15613154576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015614541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145659190615965565b600185015490915081101561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e6365000000000000006044820152606401610688565b6001860154889080156146ea576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa158015614658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061467c9190615965565b9050818110156146e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c6964000000006044820152606401610688565b505b5060078701548015614770578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b815260040161473d95949392919061597e565b600060405180830381600087803b15801561475757600080fd5b505af115801561476b573d6000803e3d6000fd5b505050505b50600987015480156147f6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b81526004016147c395949392919061597e565b600060405180830381600087803b1580156147dd57600080fd5b505af11580156147f1573d6000803e3d6000fd5b505050505b506005870154801561492b5773ffffffffffffffffffffffffffffffffffffffff84166148b1576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b15801561489457600080fd5b505af11580156148a8573d6000803e3d6000fd5b5050505061492b565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b81526004016148f895949392919061597e565b600060405180830381600087803b15801561491257600080fd5b505af1158015614926573d6000803e3d6000fd5b505050505b50600387015480156149b1578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b815260040161497e95949392919061597e565b600060405180830381600087803b15801561499857600080fd5b505af11580156149ac573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015614aa65760006149e1600183615923565b85549091506000906149f590600190615923565b9050818114614a5a576000866000018281548110614a1557614a15615660565b9060005260206000200154905080876000018481548110614a3857614a38615660565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6b57614a6b615a5f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f9565b60009150506105f9565b83811561105b573073ffffffffffffffffffffffffffffffffffffffff851603614c155773ffffffffffffffffffffffffffffffffffffffff831615614b90576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015614b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b8a919061568f565b5061105b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050505061105b565b73ffffffffffffffffffffffffffffffffffffffff831615614c94576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401614b47565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af1158015614d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d33919061568f565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614d9c57600080fd5b505af1158015614400573d6000803e3d6000fd5b6040518060400160405280614ded6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001606081525090565b6040518060400160405280614e0d614f2c565b8152602001614e5a60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b905290565b828054828255906000526020600020908101928215614ed9579160200282015b82811115614ed957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190614e7f565b50614ee5929150614fb3565b5090565b50805460008255906000526020600020908101906114159190614fb3565b50805460008255601f0160209004906000526020600020908101906114159190614fb3565b6040518060e0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001614e5a60405180606001604052806000815260200160008152602001600081525090565b5b80821115614ee55760008155600101614fb4565b600060208284031215614fda57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561502757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614ff5565b509495945050505050565b6040815260006150456040830185614fe1565b82810360208481019190915284518083528582019282019060005b8181101561507c57845183529383019391830191600101615060565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141557600080fd5b80356150b681615089565b919050565b600080604083850312156150ce57600080fd5b82356150d981615089565b946020939093013593505050565b60008083601f8401126150f957600080fd5b50813567ffffffffffffffff81111561511157600080fd5b60208301915083602082850101111561512957600080fd5b9250929050565b60008060008060006080868803121561514857600080fd5b853561515381615089565b9450602086013561516381615089565b935060408601359250606086013567ffffffffffffffff81111561518657600080fd5b615192888289016150e7565b969995985093965092949392505050565b6000806000606084860312156151b857600080fd5b83356151c381615089565b95602085013595506040909401359392505050565b602081526000611eeb6020830184614fe1565b6000610100825184526020808401518186015260408401516040860152606084015160608601526080840151608086015260a084015160a086015260c084015160c086015260e08401518260e087015280518084880152600093505b8084101561526657818401830151878501610120015292820192615247565b61012093506000848289010152837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011688010194505050505092915050565b602081526000825180516020840152602081015173ffffffffffffffffffffffffffffffffffffffff808216604086015260408301516060860152606083015160808601528060808401511660a0860152505060a0810151151560c084015260c08101519050805160e084015260208101516101008401526040810151610120840152506020830151610140808185015250611ea76101608401826151eb565b60008083601f84011261535b57600080fd5b50813567ffffffffffffffff81111561537357600080fd5b6020830191508360208260051b850101111561512957600080fd5b60008060008060008060008060a0898b0312156153aa57600080fd5b88356153b581615089565b975060208901356153c581615089565b9650604089013567ffffffffffffffff808211156153e257600080fd5b6153ee8c838d01615349565b909850965060608b013591508082111561540757600080fd5b6154138c838d01615349565b909650945060808b013591508082111561542c57600080fd5b506154398b828c016150e7565b999c989b5096995094979396929594505050565b60006020828403121561545f57600080fd5b8135611eeb81615089565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080608085870312156154af57600080fd5b84356154ba81615089565b9350602085810135935060408601359250606086013567ffffffffffffffff808211156154e657600080fd5b818801915088601f8301126154fa57600080fd5b81358181111561550c5761550c61546a565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561554f5761554f61546a565b60405291825284820192508381018501918b83111561556d57600080fd5b938501935b8285101561559257615583856150ab565b84529385019392850192615572565b989b979a50959850505050505050565b60008060008060008060a087890312156155bb57600080fd5b86356155c681615089565b955060208701356155d681615089565b94506040870135935060608701359250608087013567ffffffffffffffff81111561560057600080fd5b61560c89828a016150e7565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156156a157600080fd5b81518015158114611eeb57600080fd5b6000602082840312156156c357600080fd5b8151611eeb81615089565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036156ff576156ff61561e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181811c9082168061574957607f821691505b602082108103615782577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561058e57600081815260208120601f850160051c810160208610156157af5750805b601f850160051c820191505b81811015611059578281556001016157bb565b815167ffffffffffffffff8111156157e8576157e861546a565b6157fc816157f68454615735565b84615788565b602080601f83116001811461584f57600084156158195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611059565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561589c5788860151825594840194600190910190840161587d565b50858210156158d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008261591e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60006020828403121561597757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a060808501526000915084546159c581615735565b8060a087015260c06001808416600081146159e75760018114615a1f57615a4d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650615a4d565b896000528560002060005b85811015615a455781548b8201860152908301908701615a2a565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f22983160a3468f0ef40108f7002624e8f53c6e8bed654e80c45e7a1dcb668ef64736f6c63430008140033", + "deployedBytecode": "0x6080604052600436106101965760003560e01c80639637460e116100e1578063bfa640361161008a578063e5ed1d5911610064578063e5ed1d59146104d7578063efaa55a0146104f7578063f23a6e611461050a578063f72ea4671461052a57600080fd5b8063bfa6403614610477578063cca84a0c14610497578063e240ae5f146104b757600080fd5b8063b55991c0116100bb578063b55991c014610417578063b881cffe14610437578063bc197c811461045757600080fd5b80639637460e146103845780639a214b1e146103a4578063aee5f34a146103d257600080fd5b80634024ba751161014357806369958ab91161011d57806369958ab9146103225780637f4e4849146103425780638eed01f81461036457600080fd5b80634024ba75146102b5578063460e2049146102d557806358759df71461030257600080fd5b8063392b749c11610174578063392b749c146102455780633b17469e146102755780633feef58a1461029557600080fd5b806304527d901461019b57806307ead930146101d2578063150b7a02146101f4575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004614fc8565b61054a565b6040516101c9929190615032565b60405180910390f35b3480156101de57600080fd5b506101f26101ed3660046150bb565b61055f565b005b34801561020057600080fd5b5061021461020f366004615130565b610593565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101c9565b34801561025157600080fd5b50610265610260366004614fc8565b6105ee565b60405190151581526020016101c9565b34801561028157600080fd5b506101f26102903660046151a3565b6105ff565b3480156102a157600080fd5b506101f26102b0366004614fc8565b61076c565b3480156102c157600080fd5b506102656102d0366004614fc8565b61085d565b3480156102e157600080fd5b506102f56102f0366004614fc8565b610868565b6040516101c991906151d8565b34801561030e57600080fd5b5061026561031d366004614fc8565b610873565b34801561032e57600080fd5b506101f261033d366004614fc8565b61087e565b34801561034e57600080fd5b506103576109de565b6040516101c991906152a9565b34801561037057600080fd5b5061026561037f366004614fc8565b610ab8565b34801561039057600080fd5b5061026561039f366004614fc8565b610ac3565b3480156103b057600080fd5b506103c46103bf366004614fc8565b610afc565b6040519081526020016101c9565b3480156103de57600080fd5b506103f26103ed366004614fc8565b610b0e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c9565b34801561042357600080fd5b506103c4610432366004614fc8565b610b39565b34801561044357600080fd5b50610265610452366004614fc8565b610b6f565b34801561046357600080fd5b5061021461047236600461538e565b610b7a565b34801561048357600080fd5b506103c461049236600461544d565b610bd8565b3480156104a357600080fd5b506101f26104b2366004614fc8565b610c22565b3480156104c357600080fd5b506101f26104d2366004615499565b610c6c565b3480156104e357600080fd5b506101f26104f2366004614fc8565b611062565b6101f2610505366004614fc8565b6110a2565b34801561051657600080fd5b506102146105253660046155a2565b6111c9565b34801561053657600080fd5b506103f2610545366004614fc8565b611225565b6060806105568361126e565b91509150915091565b610567611382565b6000610571611418565b905061058e8382600301546001610588919061564d565b846105ff565b505050565b600061059d611382565b3073ffffffffffffffffffffffffffffffffffffffff8716036105e157507f150b7a02000000000000000000000000000000000000000000000000000000006105e5565b5060005b95945050505050565b60006105f982611441565b92915050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff1615610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f74207061737321000000000000000060448201526064015b60405180910390fd5b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556106c6838584336114e7565b6106ce614db0565b6106d884826117fd565b823373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f48f48f6273652830aa3718ca489b3d13c244a7215c70bab5c5c2f523aba583b68760405161073891815260200190565b60405180910390a45080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff16156107f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782556108349083903390611cab611cfc565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006105f982611e20565b60606105f982611eaf565b60006105f982611ef2565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815561093e8233611f7b565b61098a611cab6109827fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1690565b849190612018565b60405182907f71f4c9aec1b2c51302bcaf09a3f4985709759853536445493905081899603a2190600090a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b6109e6614dfa565b60006109f0611418565b905060006109fc612213565b60408051610120810182528454818301908152600186015473ffffffffffffffffffffffffffffffffffffffff90811660608085019190915260028801546080850152600388015460a0850152600488015491821660c08501527401000000000000000000000000000000000000000090910460ff16151560e084015283519081018452600587015481526006870154602080830191909152600790970154938101939093526101008201929092529081529283015250919050565b60006105f982612432565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600b015460ff166105f9565b6000610b07826124c7565b5492915050565b6000610b19826124c7565b6001015473ffffffffffffffffffffffffffffffffffffffff1692915050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600101546105f9565b60006105f9826124ff565b6000610b84611382565b3073ffffffffffffffffffffffffffffffffffffffff8a1603610bc857507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621610bcc565b5060005b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3660205260408120546105f9565b610c2c8133611f7b565b610c3581612586565b610c3e816126b7565b60405181907f5da9fef10786347975dd7cc4fc53417cff6969b0f7a9b6763169306c8cbeb63690600090a250565b610c778484846105ff565b6000610c82846124c7565b9050815160001461105b5760005b8251811015611043576000838281518110610cad57610cad615660565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fb0262bf600000000000000000000000000000000000000000000000000000000600482015290915073ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d69919061568f565b610dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d75737420737570706f72742072616e6b20696e7465726661636500000000006044820152606401610688565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16635c87c8f96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5591906156b1565b73ffffffffffffffffffffffffffffffffffffffff1614610ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d7573742062652072616e6b696e67496e7374616e63650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff811663731133e9306001610efb898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b5050505050808061103b906156ce565b915050610c90565b5081516110599060088301906020850190614e5f565b505b5050505050565b61106b8161275c565b611074816127d3565b60405181907f50ad08f58a27f2851d7e3a1b3a6a46b290f2ce677e99642d30ff639721e7779090600090a250565b7fddce64af877bbb30b6a5e98c16fd4fee7160a0f8a0a2f9abfbb4a2d661459309805460ff161561112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5245473a20596f75207368616c6c206e6f7420706173732100000000000000006044820152606401610688565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781556111628233612ae0565b61116b82612bec565b60405133815282907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b60006111d3611382565b3073ffffffffffffffffffffffffffffffffffffffff88160361121757507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9761121b565b5060005b9695505050505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081205473ffffffffffffffffffffffffffffffffffffffff166105f9565b606080600061127c84611eaf565b90506000815167ffffffffffffffff81111561129a5761129a61546a565b6040519080825280602002602001820160405280156112c3578160200160208202803683370190505b50905060005b825181101561137757611348868483815181106112e8576112e8615660565b602002602001015160009182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684526009909201905290205490565b82828151811061135a5761135a615660565b60209081029190910101528061136f816156ce565b9150506112c9565b509094909350915050565b600061138c611418565b600481015490915074010000000000000000000000000000000000000000900460ff16611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610688565b50565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df8526105f9565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d906114be60058401612c51565b14806114ce57506114ce84612c5b565b156114dd575060019392505050565b5060009392505050565b6114ef611382565b60006114f9611418565b90506115058585612d2e565b6000611510866124c7565b90508360000361157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f67616d652072616e6b206e6f74207370656369666965640000000000000000006044820152606401610688565b81541561163357600182015482546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015611606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162a919061568f565b50815460098201555b600181810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861617905560038301805460009061168a90849061564d565b9091555050838155600482015473ffffffffffffffffffffffffffffffffffffffff168063731133e93060016116c0898261564d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091526044820152608060648201526000608482015260a401600060405180830381600087803b15801561174157600080fd5b505af1158015611755573d6000803e3d6000fd5b50506040517f731133e90000000000000000000000000000000000000000000000000000000081523060048201526003602482015260448101889052608060648201526000608482015273ffffffffffffffffffffffffffffffffffffffff8416925063731133e9915060a401600060405180830381600087803b1580156117dc57600080fd5b505af11580156117f0573d6000803e3d6000fd5b5050505050505050505050565b60006118528360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905080600801546000148061187d575080600701548160060154611876919061564d565b8160080154145b611909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610688565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155611947600a82016000614ee9565b611955600b82016000614ee9565b611963600982016000614f07565b60005b826020015151811015611c7a5781600a018360200151828151811061198d5761198d615660565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b8401919083908110611a0c57611a0c615660565b602090810291909101810151810151825460018101845560009384529282902090920191909155830151805160098401919083908110611a4e57611a4e615660565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a918202191690836002811115611a9e57611a9e615706565b021790555082602001518181518110611ab957611ab9615660565b60200260200101516060015182600001600085602001518481518110611ae157611ae1615660565b6020026020010151604001516002811115611afe57611afe615706565b6002811115611b0f57611b0f615706565b8152602001908152602001600020600085602001518481518110611b3557611b35615660565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110611b9357611b93615660565b60209081029190910181015181015182528101919091526040016000208151805182908190611bc290826157ce565b50602091820151600190910155820151805160028301908190611be590826157ce565b50602091909101516001909101556040820151805160048301908190611c0b90826157ce565b50602091909101516001909101556060820151805160068301908190611c3190826157ce565b50602091909101516001909101556080820151805160088301908190611c5790826157ce565b506020820151816001015550509050508080611c72906156ce565b915050611966565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b611cb5828261302c565b60405173ffffffffffffffffffffffffffffffffffffffff82169083907fb2bd643202385c64d9814c6c3fa61b1ba098d6652292e9d9a6f1a0cdae6eb82490600090a35050565b6000611d06611418565b90508060020154600014611e0857600083611d22576001611d25565b60025b60ff1690506000818360020154611d3c91906158e8565b90506000611d49886124c7565b905081816009016000828254611d5f9190615923565b909155505060018401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e03919061568f565b505050505b611e12858561308d565b61105b85858463ffffffff16565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303611e84575060009392505050565b6003810154611e93904261564d565b826003015410611ea4576000611ea7565b60015b949350505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020606090611eeb6005820161315a565b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081206000611f2d82600501612c51565b826008015414611f3e576000611f41565b60015b600483015490915060ff161580611f5c5750611f5c84612432565b15611f6b575060009392505050565b80806114ce57506114ce84613167565b611f848261275c565b6000611f8f836124c7565b600181015490915073ffffffffffffffffffffffffffffffffffffffff83811691161461058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f720000000000000000000000000000006044820152606401610688565b600061202384611eaf565b905060005b8151811015612069576120578583838151811061204757612047615660565b6020026020010151600087611cfc565b80612061816156ce565b915050612028565b506000612075856124c7565b90506000612081611418565b905060006002826000015461209691906158e8565b600183810154908501546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b919061568f565b50808360090160008282546121509190615923565b9091555050600182015460098401546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482019290925291169063a9059cbb906044016020604051808303816000875af11580156121d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f9919061568f565b506000600984015561220a876131db565b50505050505050565b61225b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60408051610100810182527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d805482527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2e5460208301527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2f54928201929092527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f305460608201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460808201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f325460a08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f335460c08201527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f348054839160e08401916123aa90615735565b80601f01602080910402602001604051908101604052809291908181526020018280546123d690615735565b80156124235780601f106123f857610100808354040283529160200191612423565b820191906000526020600020905b81548152906001019060200180831161240657829003601f168201915b50505050508152505091505090565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d92911080156114ce5750600b81015460ff166114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a01548190611eeb565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f315460018201547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d929190036114dd575060019392505050565b61258f81611e20565b1561261c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610688565b6126c081613446565b612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f67616d65206e6f7420666f756e640000000000000000000000000000000000006044820152606401610688565b60009081527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902042600390910155565b612764611382565b61276d81613446565b611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610688565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f737461727447616d652d3e616c726561647920737461727465640000000000006044820152606401610688565b8160030154600003612925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f737461727447616d652d3e47616d6520726567697374726174696f6e2077617360448201527f206e6f7420796574206f70656e000000000000000000000000000000000000006064820152608401610688565b8260000361298f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f737461727447616d652d3e47616d65206e6f7420666f756e64000000000000006044820152606401610688565b60028101546129a060058401612c51565b1015612a08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6001810154612a1960058401612c51565b1480612a37575060038082015490830154612a34919061564d565b42115b612a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f737461727447616d652d3e4e6f7420656e6f75676820706c61796572730000006044820152606401610688565b6004820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660019081179091558281015542600283015561058e826134a2565b612ae98261275c565b612af38282613533565b6000612afd611418565b90508060020154600014612be257600181015460028201546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015230602483015260448201929092529116906323b872dd906064016020604051808303816000875af1158015612b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb5919061568f565b506000612bc1846124c7565b90508160020154816009016000828254612bdb919061564d565b9091555050505b61058e83836135e7565b6000612c418260408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050612c4d8133613886565b5050565b60006105f9825490565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060048101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9060ff1615612cc1575060009392505050565b8160030154600003612cd7575060009392505050565b83600003612ce9575060009392505050565b60038082015490830154612cfd919061564d565b4211612d0d575060009392505050565b6002810154612d1e60058401612c51565b1015611ea4575060009392505050565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d612d5883613446565b15612dbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63726561746547616d652d3e416c7265616479206578697374730000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216612e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746547616d652d3e474d0000000000000000000000000000000000006044820152606401610688565b82600003612ea6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b600083815260088201602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f63726561746547616d652d3e67616d65496400000000000000000000000000006044820152606401610688565b6000838152600882016020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516179055600a8201805460019290612f9790849061564d565b9091555050600a8101546040805160208101869052908101919091527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d6060820152608001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009586526008909301909152909220600a019190915550565b60006130818360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b905061058e8183613920565b6130968261275c565b6130a082826139c3565b60006130aa611418565b905060006130b7846124c7565b905060018160000154111561315457805460048301546130ee91859173ffffffffffffffffffffffffffffffffffffffff16613bcf565b60005b600882015481101561105b5761314284836000015484600801848154811061311b5761311b615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613bcf565b8061314c816156ce565b9150506130f1565b50505050565b60606000611eeb83613c68565b60008061317383613cc4565b60008481527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040902060048101549192509060ff1615806131bc57506131bc84612432565b156131cb575060009392505050565b81156114dd575060019392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d916132366005830161315a565b905060005b8151811015613355576000846008016000878152602001908152602001600020600901600084848151811061327257613272615660565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600084600801600087815260200190815260200160002060070160008484815181106132e6576132e6615660565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061334d816156ce565b91505061323b565b506000848152600884016020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055600a8101829055600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556133fd91600c90910190614ee9565b60008481526008808501602052604082209081018290556005019081816134248282614ee9565b5050506000948552505050600801602052604081206003810182905560020155565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff16156134995750600192915050565b50600092915050565b60005b6134b182600501612c51565b811015612c4d5760006134c76005840183613d5d565b73ffffffffffffffffffffffffffffffffffffffff166000908152600784016020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560098601909152812055508061352b816156ce565b9150506134a5565b600061353d611418565b9050600061354a846124c7565b9050600181600001541115613154578054600483015461358191859173ffffffffffffffffffffffffffffffffffffffff16613d69565b60005b600882015481101561105b576135d58483600001548460080184815481106135ae576135ae615660565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16613d69565b806135df816156ce565b915050613584565b7f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d61361183613446565b613677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f616464506c617965722d3e696e76616c69642067616d650000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260098201602052604090205415613706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f616464506c617965722d3e506c6179657220696e2067616d65000000000000006044820152606401610688565b60008381527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260409020600182015461374460058301612c51565b106137ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464506c617965722d3e70617274792066756c6c00000000000000000000006044820152606401610688565b6137b484613dce565b61381a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f616464506c617965722d3e63616e74206a6f696e206e6f7700000000000000006044820152606401610688565b6138276005820184613e27565b5073ffffffffffffffffffffffffffffffffffffffff909216600090815260079092016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560099092019052902055565b600c82015460ff166138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f736974696f6e20646f6573206e6f742065786973740000000000000000006044820152606401610688565b613902828230303030613e49565b6001826008016000828254613917919061564d565b90915550505050565b816008015482600701548360060154613939919061564d565b106139a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656e6f7567682062616c616e636520746f20726566756e64000000006044820152606401610688565b6139ae823083848586613e49565b6001826006016000828254613917919061564d565b60008281527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d90613a1b84613446565b613a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f67616d6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009830160205260409020548414613b11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420696e207468652067616d6500000000000000000000000000000000006044820152606401610688565b600481015460ff161580613b345750600481015460ff6101009091041615156001145b613b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e6e6f74206c65617665206f6e63652073746172746564000000000000006044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260098301602052604081205561105b60058201846141ed565b6040517fb5674c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063b5674c68906064015b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613cb857602002820191906000526020600020905b815481526020019060010190808311613ca4575b50505050509050919050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604081207f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d9083600003613d2357613d23615936565b600481015460ff161515600114613d3c57613d3c615936565b60028101548254613d4d919061564d565b4211611ea4575060009392505050565b6000611eeb838361420f565b6040517fe2ab691d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526001604483015282919082169063e2ab691d90606401613c30565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600481015460ff1680613e1057506003810154155b15613e1e5750600092915050565b50600192915050565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff8416614239565b3073ffffffffffffffffffffffffffffffffffffffff861603613fb357600286015415613eb857600286015460405173ffffffffffffffffffffffffffffffffffffffff83169180156108fc02916000818181858888f19350505050158015613eb6573d6000803e3d6000fd5b505b600486015415613f0a57600486015460405173ffffffffffffffffffffffffffffffffffffffff86169180156108fc02916000818181858888f19350505050158015613f08573d6000803e3d6000fd5b505b600586015415613f5c57600586015460405173ffffffffffffffffffffffffffffffffffffffff85169180156108fc02916000818181858888f19350505050158015613f5a573d6000803e3d6000fd5b505b600386015415613fae57600386015460405173ffffffffffffffffffffffffffffffffffffffff84169180156108fc02916000818181858888f19350505050158015613fac573d6000803e3d6000fd5b505b614057565b60038601546005870154600488015460028901546000939291613fd59161564d565b613fdf919061564d565b613fe9919061564d565b905080341015614055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6d73672e76616c756520746f6f206c6f770000000000000000000000000000006044820152606401610688565b505b60005b600a87015481101561220a57600087600a01828154811061407d5761407d615660565b6000918252602082200154600b8a01805473ffffffffffffffffffffffffffffffffffffffff909216935090849081106140b9576140b9615660565b9060005260206000200154905060008960090184815481106140dd576140dd615660565b60009182526020808320908204015460ff601f9092166101000a90041691508a8183600281111561411057614110615706565b600281111561412157614121615706565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8816825283528181208682529092528120915082600281111561417057614170615706565b036141895761418484828c8c8c8c8c614288565b6141d6565b600282600281111561419d5761419d615706565b036141ad5761418484828c61440b565b60018260028111156141c1576141c1615706565b036141d6576141d68484838d8d8d8d8d6145d6565b5050505080806141e5906156ce565b91505061405a565b6000611eeb8373ffffffffffffffffffffffffffffffffffffffff84166149bd565b600082600001828154811061422657614226615660565b9060005260206000200154905092915050565b6000818152600183016020526040812054614280575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f9565b5060006105f9565b61429b8786838960020160010154614ab0565b6142ae8786848960040160010154614ab0565b6142c18786868960060160010154614ab0565b6142d48786858960080160010154614ab0565b600186015487908015801590614300575073ffffffffffffffffffffffffffffffffffffffff87163014155b15614400576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528291908416906370a0823190602401602060405180830381865afa158015614374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143989190615965565b1015614400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656e6f75676820657263323020746f6b656e730000000000000000006044820152606401610688565b505050505050505050565b6003820154839015801561442157506005830154155b801561442f57506007830154155b801561443d57506009830154155b6144a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f455243373231207472616e7366657273206e6f7420737570706f7274656400006044820152606401610688565b6001830154158015906144cc575073ffffffffffffffffffffffffffffffffffffffff82163014155b15613154576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908316906370a0823190602401602060405180830381865afa158015614541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145659190615965565b600185015490915081101561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4e6f7420656e6f756768204552433732312062616c616e6365000000000000006044820152606401610688565b6001860154889080156146ea576040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526000919084169062fdd58e90604401602060405180830381865afa158015614658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061467c9190615965565b9050818110156146e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f455243313135352062616c616e6365206973206e6f742076616c6964000000006044820152606401610688565b505b5060078701548015614770578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88888c858d6006016000016040518663ffffffff1660e01b815260040161473d95949392919061597e565b600060405180830381600087803b15801561475757600080fd5b505af115801561476b573d6000803e3d6000fd5b505050505b50600987015480156147f6578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88878c858d6008016000016040518663ffffffff1660e01b81526004016147c395949392919061597e565b600060405180830381600087803b1580156147dd57600080fd5b505af11580156147f1573d6000803e3d6000fd5b505050505b506005870154801561492b5773ffffffffffffffffffffffffffffffffffffffff84166148b1576040517ff5298aca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018b90526044820183905283169063f5298aca90606401600060405180830381600087803b15801561489457600080fd5b505af11580156148a8573d6000803e3d6000fd5b5050505061492b565b8173ffffffffffffffffffffffffffffffffffffffff1663f242432a88868c858d6004016000016040518663ffffffff1660e01b81526004016148f895949392919061597e565b600060405180830381600087803b15801561491257600080fd5b505af1158015614926573d6000803e3d6000fd5b505050505b50600387015480156149b1578173ffffffffffffffffffffffffffffffffffffffff1663f242432a88858c858d6002016000016040518663ffffffff1660e01b815260040161497e95949392919061597e565b600060405180830381600087803b15801561499857600080fd5b505af11580156149ac573d6000803e3d6000fd5b505050505b50505050505050505050565b60008181526001830160205260408120548015614aa65760006149e1600183615923565b85549091506000906149f590600190615923565b9050818114614a5a576000866000018281548110614a1557614a15615660565b9060005260206000200154905080876000018481548110614a3857614a38615660565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6b57614a6b615a5f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f9565b60009150506105f9565b83811561105b573073ffffffffffffffffffffffffffffffffffffffff851603614c155773ffffffffffffffffffffffffffffffffffffffff831615614b90576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905282169063a9059cbb906044015b6020604051808303816000875af1158015614b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b8a919061568f565b5061105b565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050505061105b565b73ffffffffffffffffffffffffffffffffffffffff831615614c94576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528481166024830152604482018490528216906323b872dd90606401614b47565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152604482018490528216906323b872dd906064016020604051808303816000875af1158015614d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d33919061568f565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216906342966c6890602401600060405180830381600087803b158015614d9c57600080fd5b505af1158015614400573d6000803e3d6000fd5b6040518060400160405280614ded6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001606081525090565b6040518060400160405280614e0d614f2c565b8152602001614e5a60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b905290565b828054828255906000526020600020908101928215614ed9579160200282015b82811115614ed957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190614e7f565b50614ee5929150614fb3565b5090565b50805460008255906000526020600020908101906114159190614fb3565b50805460008255601f0160209004906000526020600020908101906114159190614fb3565b6040518060e0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001614e5a60405180606001604052806000815260200160008152602001600081525090565b5b80821115614ee55760008155600101614fb4565b600060208284031215614fda57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561502757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614ff5565b509495945050505050565b6040815260006150456040830185614fe1565b82810360208481019190915284518083528582019282019060005b8181101561507c57845183529383019391830191600101615060565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141557600080fd5b80356150b681615089565b919050565b600080604083850312156150ce57600080fd5b82356150d981615089565b946020939093013593505050565b60008083601f8401126150f957600080fd5b50813567ffffffffffffffff81111561511157600080fd5b60208301915083602082850101111561512957600080fd5b9250929050565b60008060008060006080868803121561514857600080fd5b853561515381615089565b9450602086013561516381615089565b935060408601359250606086013567ffffffffffffffff81111561518657600080fd5b615192888289016150e7565b969995985093965092949392505050565b6000806000606084860312156151b857600080fd5b83356151c381615089565b95602085013595506040909401359392505050565b602081526000611eeb6020830184614fe1565b6000610100825184526020808401518186015260408401516040860152606084015160608601526080840151608086015260a084015160a086015260c084015160c086015260e08401518260e087015280518084880152600093505b8084101561526657818401830151878501610120015292820192615247565b61012093506000848289010152837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011688010194505050505092915050565b602081526000825180516020840152602081015173ffffffffffffffffffffffffffffffffffffffff808216604086015260408301516060860152606083015160808601528060808401511660a0860152505060a0810151151560c084015260c08101519050805160e084015260208101516101008401526040810151610120840152506020830151610140808185015250611ea76101608401826151eb565b60008083601f84011261535b57600080fd5b50813567ffffffffffffffff81111561537357600080fd5b6020830191508360208260051b850101111561512957600080fd5b60008060008060008060008060a0898b0312156153aa57600080fd5b88356153b581615089565b975060208901356153c581615089565b9650604089013567ffffffffffffffff808211156153e257600080fd5b6153ee8c838d01615349565b909850965060608b013591508082111561540757600080fd5b6154138c838d01615349565b909650945060808b013591508082111561542c57600080fd5b506154398b828c016150e7565b999c989b5096995094979396929594505050565b60006020828403121561545f57600080fd5b8135611eeb81615089565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080608085870312156154af57600080fd5b84356154ba81615089565b9350602085810135935060408601359250606086013567ffffffffffffffff808211156154e657600080fd5b818801915088601f8301126154fa57600080fd5b81358181111561550c5761550c61546a565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561554f5761554f61546a565b60405291825284820192508381018501918b83111561556d57600080fd5b938501935b8285101561559257615583856150ab565b84529385019392850192615572565b989b979a50959850505050505050565b60008060008060008060a087890312156155bb57600080fd5b86356155c681615089565b955060208701356155d681615089565b94506040870135935060608701359250608087013567ffffffffffffffff81111561560057600080fd5b61560c89828a016150e7565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156156a157600080fd5b81518015158114611eeb57600080fd5b6000602082840312156156c357600080fd5b8151611eeb81615089565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036156ff576156ff61561e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181811c9082168061574957607f821691505b602082108103615782577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561058e57600081815260208120601f850160051c810160208610156157af5750805b601f850160051c820191505b81811015611059578281556001016157bb565b815167ffffffffffffffff8111156157e8576157e861546a565b6157fc816157f68454615735565b84615788565b602080601f83116001811461584f57600084156158195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611059565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561589c5788860151825594840194600190910190840161587d565b50858210156158d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008261591e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156105f9576105f961561e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60006020828403121561597757600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260208188168185015286604085015285606085015260a060808501526000915084546159c581615735565b8060a087015260c06001808416600081146159e75760018114615a1f57615a4d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019650615a4d565b896000528560002060005b85811015615a455781548b8201860152908301908701615a2a565b8a0184019750505b50949c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220f22983160a3468f0ef40108f7002624e8f53c6e8bed654e80c45e7a1dcb668ef64736f6c63430008140033", "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/anvil/RankifyInstanceRequirementsFacet.json b/deployments/anvil/RankifyInstanceRequirementsFacet.json index 684a87a..cea1dfa 100644 --- a/deployments/anvil/RankifyInstanceRequirementsFacet.json +++ b/deployments/anvil/RankifyInstanceRequirementsFacet.json @@ -1,5 +1,5 @@ { - "address": "0x63F5f4f6653016B08527A4FEa4DFe9800fFD0Fd5", + "address": "0x837e298D2472337ad89d666eAFb6c272728fd43b", "abi": [ { "anonymous": false, @@ -544,28 +544,28 @@ "type": "function" } ], - "transactionHash": "0x0aad5d705130d79b456ead0b381729d629dbdf0cd0d09ef04df9df369ae11048", + "transactionHash": "0x42e777ace75ef73d5fc16e3a610021c2b2fee49551d2a4227f45ae7166699c14", "receipt": { "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", - "from": "0x507c2d32185667156de5B4C440FEEf3800078bDb", + "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", "contractAddress": null, "transactionIndex": 0, "gasUsed": "1693599", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7d1e019a9197476c0099c881dfbe1803cb6899d90ed4f695090b0fe8920ba74c", - "transactionHash": "0x0aad5d705130d79b456ead0b381729d629dbdf0cd0d09ef04df9df369ae11048", + "blockHash": "0x731a1b5faef8dc3bcfd3624d0ddcc4e5fc8358a082588a68f518ea6b8a9719cb", + "transactionHash": "0x42e777ace75ef73d5fc16e3a610021c2b2fee49551d2a4227f45ae7166699c14", "logs": [], - "blockNumber": 406, + "blockNumber": 491, "cumulativeGasUsed": "1693599", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "af20401871b7f4e560e69ce739339e01", - "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"contractRequirement\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.configSmartRequirement[]\",\"name\":\"contracts\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"struct LibCoinVending.ConfigPosition\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"RequirementsConfigured\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getJoinRequirements\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"timesRefunded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timesReleased\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timesFunded\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"contractAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"contractIds\",\"type\":\"uint256[]\"},{\"internalType\":\"enum LibCoinVending.ContractTypes[]\",\"name\":\"contractTypes\",\"type\":\"uint8[]\"},{\"internalType\":\"bool\",\"name\":\"_isConfigured\",\"type\":\"bool\"}],\"internalType\":\"struct LibCoinVending.ConditionReturn\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getJoinRequirementsByToken\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"contractRequirement\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.configSmartRequirement[]\",\"name\":\"contracts\",\"type\":\"tuple[]\"}],\"internalType\":\"struct LibCoinVending.ConfigPosition\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setJoinRequirements\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getJoinRequirements(uint256)\":{\"details\":\"Retrieves the join requirements for a specific game.\",\"params\":{\"gameId\":\"The ID of the game.\"},\"returns\":{\"_0\":\"The join requirements as a `LibCoinVending.ConditionReturn` struct.\"}},\"getJoinRequirementsByToken(uint256,address,uint256,uint8)\":{\"details\":\"Retrieves the join requirements for a specific token in a game.\",\"params\":{\"contractAddress\":\"The address of the contract.\",\"contractId\":\"The ID of the contract.\",\"contractType\":\"The type of the contract.\",\"gameId\":\"The ID of the game.\"},\"returns\":{\"_0\":\"The join requirements for the specified token.\"}},\"setJoinRequirements(uint256,((uint256,uint256,uint256,uint256,uint256),(address,uint256,uint8,((bytes,uint256),(bytes,uint256),(bytes,uint256),(bytes,uint256),(bytes,uint256)))[]))\":{\"details\":\"Sets the join requirements for a specific game. Only the game creator can call this function. The game must be in the pre-registration stage.\",\"params\":{\"config\":\"The configuration position for the join requirements.\",\"gameId\":\"The ID of the game.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceRequirementsFacet.sol\":\"RankifyInstanceRequirementsFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceRequirementsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\n\\ncontract RankifyInstanceRequirementsFacet {\\n using LibTBG for uint256;\\n using LibRankify for uint256;\\n using LibTBG for LibTBG.GameInstance;\\n event RequirementsConfigured(uint256 indexed gameId, LibCoinVending.ConfigPosition config);\\n\\n /**\\n * @dev Sets the join requirements for a specific game.\\n * Only the game creator can call this function.\\n * The game must be in the pre-registration stage.\\n *\\n * @param gameId The ID of the game.\\n * @param config The configuration position for the join requirements.\\n */\\n function setJoinRequirements(uint256 gameId, LibCoinVending.ConfigPosition memory config) public {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.enforceIsPreRegistrationStage();\\n LibCoinVending.configure(bytes32(gameId), config);\\n emit RequirementsConfigured(gameId, config);\\n }\\n\\n /**\\n * @dev Retrieves the join requirements for a specific game.\\n * @param gameId The ID of the game.\\n * @return The join requirements as a `LibCoinVending.ConditionReturn` struct.\\n */\\n function getJoinRequirements(uint256 gameId) public view returns (LibCoinVending.ConditionReturn memory) {\\n return LibCoinVending.getPosition(bytes32(gameId));\\n }\\n\\n /**\\n * @dev Retrieves the join requirements for a specific token in a game.\\n * @param gameId The ID of the game.\\n * @param contractAddress The address of the contract.\\n * @param contractId The ID of the contract.\\n * @param contractType The type of the contract.\\n * @return The join requirements for the specified token.\\n */\\n function getJoinRequirementsByToken(\\n uint256 gameId,\\n address contractAddress,\\n uint256 contractId,\\n LibCoinVending.ContractTypes contractType\\n ) public view returns (LibCoinVending.ContractCondition memory) {\\n return LibCoinVending.getPositionByContract(bytes32(gameId), contractAddress, contractId, contractType);\\n }\\n}\\n\",\"keccak256\":\"0x2324a94d8991f782e3e0458d6c41a4ad88a7e64c98968c01bb1704e1d7204ea6\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * ***WARNING*** This function is unused in the current implementation of the library.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x01cc4615c50c7ab606c54ea358f57db5fd6273518983a5659b21edc771aaa037\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611db5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80638f298b2a14610046578063bbb294f81461006f578063bf0f2d7e14610084575b600080fd5b61005961005436600461122d565b6100a4565b6040516100669190611368565b60405180910390f35b61008261007d366004611714565b6100c1565b005b6100976100923660046117dd565b61011a565b6040516100669190611918565b6100ac61107c565b6100b885858585610131565b95945050505050565b6100cb823361056f565b6100d482610616565b6100de828261074a565b817fcf4865028c280be4f5db8efbf51379eace06ea78a59dad8020a2ac3593b33fbb8260405161010e9190611a0e565b60405180910390a25050565b610122611126565b61012b82610bf8565b92915050565b61013961107c565b600061018e8660408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060008460028111156101a5576101a5611877565b60028111156101b6576101b6611877565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff89168252835281812087825290925290819020815160e081019092528054829060a082019083908290829061021490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461024090611b1b565b801561028d5780601f106102625761010080835404028352916020019161028d565b820191906000526020600020905b81548152906001019060200180831161027057829003601f168201915b505050505081526020016001820154815250508152602001600282016040518060400160405290816000820180546102c490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090611b1b565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050815260200160018201548152505081526020016004820160405180604001604052908160008201805461037490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546103a090611b1b565b80156103ed5780601f106103c2576101008083540402835291602001916103ed565b820191906000526020600020905b8154815290600101906020018083116103d057829003601f168201915b5050505050815260200160018201548152505081526020016006820160405180604001604052908160008201805461042490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461045090611b1b565b801561049d5780601f106104725761010080835404028352916020019161049d565b820191906000526020600020905b81548152906001019060200180831161048057829003601f168201915b505050505081526020016001820154815250508152602001600882016040518060400160405290816000820180546104d490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461050090611b1b565b801561054d5780601f106105225761010080835404028352916020019161054d565b820191906000526020600020905b81548152906001019060200180831161053057829003601f168201915b5050505050815260200160018201548152505081525050915050949350505050565b61057882610e23565b600061058383610e9a565b600181015490915073ffffffffffffffffffffffffffffffffffffffff838116911614610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f7200000000000000000000000000000060448201526064015b60405180910390fd5b505050565b61061f81610ed5565b156106ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610608565b50565b600061079f8360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060080154600014806107ca5750806007015481600601546107c39190611b9d565b8160080154145b610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610608565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155610894600a8201600061119d565b6108a2600b8201600061119d565b6108b06009820160006111bb565b60005b826020015151811015610bc75781600a01836020015182815181106108da576108da611bb0565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b840191908390811061095957610959611bb0565b60209081029190910181015181015182546001810184556000938452928290209092019190915583015180516009840191908390811061099b5761099b611bb0565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a9182021916908360028111156109eb576109eb611877565b021790555082602001518181518110610a0657610a06611bb0565b60200260200101516060015182600001600085602001518481518110610a2e57610a2e611bb0565b6020026020010151604001516002811115610a4b57610a4b611877565b6002811115610a5c57610a5c611877565b8152602001908152602001600020600085602001518481518110610a8257610a82611bb0565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110610ae057610ae0611bb0565b60209081029190910181015181015182528101919091526040016000208151805182908190610b0f9082611c2d565b50602091820151600190910155820151805160028301908190610b329082611c2d565b50602091909101516001909101556040820151805160048301908190610b589082611c2d565b50602091909101516001909101556060820151805160068301908190610b7e9082611c2d565b50602091909101516001909101556080820151805160088301908190610ba49082611c2d565b506020820151816001015550509050508080610bbf90611d47565b9150506108b3565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b610c00611126565b6000610c558360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050610c5f611126565b6040805160a081018252600184015481526002840154602080830191909152600385015482840152600485015460608084019190915260058601546080840152918452600885015491840191909152600684015483820152600784015483830152600c84015460ff16151560e0840152600a840180548351818402810184019094528084529091830182828015610d2c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d01575b5050505050816080018190525081600b01805480602002602001604051908101604052809291908181526020018280548015610d8757602002820191906000526020600020905b815481526020019060010190808311610d73575b50505050508160a0018190525081600901805480602002602001604051908101604052809291908181526020018280548015610e1257602002820191906000526020600020906000905b82829054906101000a900460ff166002811115610df057610df0611877565b815260206001928301818104948501949093039092029101808411610dd15790505b505050505060c08201529392505050565b610e2b610f64565b610e3481610ff7565b610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303610f39575060009392505050565b6003810154610f489042611b9d565b826003015410610f59576000610f5c565b60015b949350505050565b6000610f6e611053565b600481015490915074010000000000000000000000000000000000000000900460ff16610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff161561104a5750600192915050565b50600092915050565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261012b565b6040805160e08101909152606060a08201908152600060c0830152819081526020016110bb604051806040016040528060608152602001600081525090565b81526020016110dd604051806040016040528060608152602001600081525090565b81526020016110ff604051806040016040528060608152602001600081525090565b8152602001611121604051806040016040528060608152602001600081525090565b905290565b6040518061010001604052806111646040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b508054600082559060005260206000209081019061074791906111dc565b50805460008255601f01602090049060005260206000209081019061074791905b5b808211156111f157600081556001016111dd565b5090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461121957600080fd5b919050565b80356003811061121957600080fd5b6000806000806080858703121561124357600080fd5b84359350611253602086016111f5565b9250604085013591506112686060860161121e565b905092959194509250565b6000815160408452805180604086015260005b818110156112a35760208184018101516060888401015201611286565b506000606082870101526020840151602086015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b6000815160a0845261130160a0850182611273565b90506020830151848203602086015261131a8282611273565b915050604083015184820360408601526113348282611273565b9150506060830151848203606086015261134e8282611273565b915050608083015184820360808601526100b88282611273565b602081526000610ece60208301846112ec565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405290565b6040516080810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405160a0810167ffffffffffffffff811182821017156113cd576113cd61137b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114605761146061137b565b604052919050565b60006040828403121561147a57600080fd5b6114826113aa565b9050813567ffffffffffffffff8082111561149c57600080fd5b818401915084601f8301126114b057600080fd5b81356020828211156114c4576114c461137b565b6114f4817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601611419565b9250818352868183860101111561150a57600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600082601f83011261154057600080fd5b8135602067ffffffffffffffff8083111561155d5761155d61137b565b8260051b61156c838201611419565b938452858101830193838101908886111561158657600080fd5b84880192505b85831015611708578235848111156115a357600080fd5b88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06080828c03820112156115d857600080fd5b6115e06113d3565b6115eb8884016111f5565b8152604083013588820152606061160381850161121e565b604083015260808401358881111561161a57600080fd5b939093019260a0848e038401121561163157600080fd5b6116396113f6565b9250888401358881111561164c57600080fd5b61165a8e8b83880101611468565b84525060408401358881111561166f57600080fd5b61167d8e8b83880101611468565b8a85015250808401358881111561169357600080fd5b6116a18e8b83880101611468565b6040850152506080840135888111156116b957600080fd5b6116c78e8b83880101611468565b828501525060a0840135888111156116de57600080fd5b6116ec8e8b83880101611468565b608085015250810191909152835250918401919084019061158c565b98975050505050505050565b6000806040838503121561172757600080fd5b82359150602083013567ffffffffffffffff8082111561174657600080fd5b9084019081860360c081121561175b57600080fd5b6117636113aa565b60a082121561177157600080fd5b6117796113f6565b9150833582526020840135602083015260408401356040830152606084013560608301526080840135608083015281815260a08401359150828211156117be57600080fd5b6117ca8883860161152f565b6020820152809450505050509250929050565b6000602082840312156117ef57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561183c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161180a565b509495945050505050565b600081518084526020808501945080840160005b8381101561183c5781518752958201959082019060010161185b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106118dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600081518084526020808501945080840160005b8381101561183c576119088783516118a6565b95820195908201906001016118f5565b6020815261195560208201835180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b602082015160c0820152604082015160e0820152606082015161010082015260006080830151610180806101208501526119936101a08501836117f6565b915060a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868503016101408701526119d08483611847565b935060c087015191508086850301610160870152506119ef83826118e1565b92505060e0850151611a048286018215159052565b5090949350505050565b6000602080835260e08301611a51828501865180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b8185015160c085810152805191829052610100600583901b8601810192918401919086019060005b81811015611b0e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008886030183528351608073ffffffffffffffffffffffffffffffffffffffff82511687528782015188880152604080830151611ae0828a01826118a6565b5050606091820151918701819052611afa878201836112ec565b965050509285019291850191600101611a79565b5092979650505050505050565b600181811c90821680611b2f57607f821691505b602082108103611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561012b5761012b611b6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561061157600081815260208120601f850160051c81016020861015611c065750805b601f850160051c820191505b81811015611c2557828155600101611c12565b505050505050565b815167ffffffffffffffff811115611c4757611c4761137b565b611c5b81611c558454611b1b565b84611bdf565b602080601f831160018114611cae5760008415611c785750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611c25565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611cfb57888601518255948401946001909101908401611cdc565b5085821015611d3757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d7857611d78611b6e565b506001019056fea264697066735822122080296813bd20c3cf76760d4e2c23c639373eba336048094785c71af6d47a9b5a64736f6c63430008140033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80638f298b2a14610046578063bbb294f81461006f578063bf0f2d7e14610084575b600080fd5b61005961005436600461122d565b6100a4565b6040516100669190611368565b60405180910390f35b61008261007d366004611714565b6100c1565b005b6100976100923660046117dd565b61011a565b6040516100669190611918565b6100ac61107c565b6100b885858585610131565b95945050505050565b6100cb823361056f565b6100d482610616565b6100de828261074a565b817fcf4865028c280be4f5db8efbf51379eace06ea78a59dad8020a2ac3593b33fbb8260405161010e9190611a0e565b60405180910390a25050565b610122611126565b61012b82610bf8565b92915050565b61013961107c565b600061018e8660408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060008460028111156101a5576101a5611877565b60028111156101b6576101b6611877565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff89168252835281812087825290925290819020815160e081019092528054829060a082019083908290829061021490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461024090611b1b565b801561028d5780601f106102625761010080835404028352916020019161028d565b820191906000526020600020905b81548152906001019060200180831161027057829003601f168201915b505050505081526020016001820154815250508152602001600282016040518060400160405290816000820180546102c490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090611b1b565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050815260200160018201548152505081526020016004820160405180604001604052908160008201805461037490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546103a090611b1b565b80156103ed5780601f106103c2576101008083540402835291602001916103ed565b820191906000526020600020905b8154815290600101906020018083116103d057829003601f168201915b5050505050815260200160018201548152505081526020016006820160405180604001604052908160008201805461042490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461045090611b1b565b801561049d5780601f106104725761010080835404028352916020019161049d565b820191906000526020600020905b81548152906001019060200180831161048057829003601f168201915b505050505081526020016001820154815250508152602001600882016040518060400160405290816000820180546104d490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461050090611b1b565b801561054d5780601f106105225761010080835404028352916020019161054d565b820191906000526020600020905b81548152906001019060200180831161053057829003601f168201915b5050505050815260200160018201548152505081525050915050949350505050565b61057882610e23565b600061058383610e9a565b600181015490915073ffffffffffffffffffffffffffffffffffffffff838116911614610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f7200000000000000000000000000000060448201526064015b60405180910390fd5b505050565b61061f81610ed5565b156106ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610608565b50565b600061079f8360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060080154600014806107ca5750806007015481600601546107c39190611b9d565b8160080154145b610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610608565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155610894600a8201600061119d565b6108a2600b8201600061119d565b6108b06009820160006111bb565b60005b826020015151811015610bc75781600a01836020015182815181106108da576108da611bb0565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b840191908390811061095957610959611bb0565b60209081029190910181015181015182546001810184556000938452928290209092019190915583015180516009840191908390811061099b5761099b611bb0565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a9182021916908360028111156109eb576109eb611877565b021790555082602001518181518110610a0657610a06611bb0565b60200260200101516060015182600001600085602001518481518110610a2e57610a2e611bb0565b6020026020010151604001516002811115610a4b57610a4b611877565b6002811115610a5c57610a5c611877565b8152602001908152602001600020600085602001518481518110610a8257610a82611bb0565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110610ae057610ae0611bb0565b60209081029190910181015181015182528101919091526040016000208151805182908190610b0f9082611c2d565b50602091820151600190910155820151805160028301908190610b329082611c2d565b50602091909101516001909101556040820151805160048301908190610b589082611c2d565b50602091909101516001909101556060820151805160068301908190610b7e9082611c2d565b50602091909101516001909101556080820151805160088301908190610ba49082611c2d565b506020820151816001015550509050508080610bbf90611d47565b9150506108b3565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b610c00611126565b6000610c558360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050610c5f611126565b6040805160a081018252600184015481526002840154602080830191909152600385015482840152600485015460608084019190915260058601546080840152918452600885015491840191909152600684015483820152600784015483830152600c84015460ff16151560e0840152600a840180548351818402810184019094528084529091830182828015610d2c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d01575b5050505050816080018190525081600b01805480602002602001604051908101604052809291908181526020018280548015610d8757602002820191906000526020600020905b815481526020019060010190808311610d73575b50505050508160a0018190525081600901805480602002602001604051908101604052809291908181526020018280548015610e1257602002820191906000526020600020906000905b82829054906101000a900460ff166002811115610df057610df0611877565b815260206001928301818104948501949093039092029101808411610dd15790505b505050505060c08201529392505050565b610e2b610f64565b610e3481610ff7565b610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303610f39575060009392505050565b6003810154610f489042611b9d565b826003015410610f59576000610f5c565b60015b949350505050565b6000610f6e611053565b600481015490915074010000000000000000000000000000000000000000900460ff16610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff161561104a5750600192915050565b50600092915050565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261012b565b6040805160e08101909152606060a08201908152600060c0830152819081526020016110bb604051806040016040528060608152602001600081525090565b81526020016110dd604051806040016040528060608152602001600081525090565b81526020016110ff604051806040016040528060608152602001600081525090565b8152602001611121604051806040016040528060608152602001600081525090565b905290565b6040518061010001604052806111646040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b508054600082559060005260206000209081019061074791906111dc565b50805460008255601f01602090049060005260206000209081019061074791905b5b808211156111f157600081556001016111dd565b5090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461121957600080fd5b919050565b80356003811061121957600080fd5b6000806000806080858703121561124357600080fd5b84359350611253602086016111f5565b9250604085013591506112686060860161121e565b905092959194509250565b6000815160408452805180604086015260005b818110156112a35760208184018101516060888401015201611286565b506000606082870101526020840151602086015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b6000815160a0845261130160a0850182611273565b90506020830151848203602086015261131a8282611273565b915050604083015184820360408601526113348282611273565b9150506060830151848203606086015261134e8282611273565b915050608083015184820360808601526100b88282611273565b602081526000610ece60208301846112ec565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405290565b6040516080810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405160a0810167ffffffffffffffff811182821017156113cd576113cd61137b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114605761146061137b565b604052919050565b60006040828403121561147a57600080fd5b6114826113aa565b9050813567ffffffffffffffff8082111561149c57600080fd5b818401915084601f8301126114b057600080fd5b81356020828211156114c4576114c461137b565b6114f4817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601611419565b9250818352868183860101111561150a57600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600082601f83011261154057600080fd5b8135602067ffffffffffffffff8083111561155d5761155d61137b565b8260051b61156c838201611419565b938452858101830193838101908886111561158657600080fd5b84880192505b85831015611708578235848111156115a357600080fd5b88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06080828c03820112156115d857600080fd5b6115e06113d3565b6115eb8884016111f5565b8152604083013588820152606061160381850161121e565b604083015260808401358881111561161a57600080fd5b939093019260a0848e038401121561163157600080fd5b6116396113f6565b9250888401358881111561164c57600080fd5b61165a8e8b83880101611468565b84525060408401358881111561166f57600080fd5b61167d8e8b83880101611468565b8a85015250808401358881111561169357600080fd5b6116a18e8b83880101611468565b6040850152506080840135888111156116b957600080fd5b6116c78e8b83880101611468565b828501525060a0840135888111156116de57600080fd5b6116ec8e8b83880101611468565b608085015250810191909152835250918401919084019061158c565b98975050505050505050565b6000806040838503121561172757600080fd5b82359150602083013567ffffffffffffffff8082111561174657600080fd5b9084019081860360c081121561175b57600080fd5b6117636113aa565b60a082121561177157600080fd5b6117796113f6565b9150833582526020840135602083015260408401356040830152606084013560608301526080840135608083015281815260a08401359150828211156117be57600080fd5b6117ca8883860161152f565b6020820152809450505050509250929050565b6000602082840312156117ef57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561183c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161180a565b509495945050505050565b600081518084526020808501945080840160005b8381101561183c5781518752958201959082019060010161185b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106118dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600081518084526020808501945080840160005b8381101561183c576119088783516118a6565b95820195908201906001016118f5565b6020815261195560208201835180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b602082015160c0820152604082015160e0820152606082015161010082015260006080830151610180806101208501526119936101a08501836117f6565b915060a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868503016101408701526119d08483611847565b935060c087015191508086850301610160870152506119ef83826118e1565b92505060e0850151611a048286018215159052565b5090949350505050565b6000602080835260e08301611a51828501865180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b8185015160c085810152805191829052610100600583901b8601810192918401919086019060005b81811015611b0e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008886030183528351608073ffffffffffffffffffffffffffffffffffffffff82511687528782015188880152604080830151611ae0828a01826118a6565b5050606091820151918701819052611afa878201836112ec565b965050509285019291850191600101611a79565b5092979650505050505050565b600181811c90821680611b2f57607f821691505b602082108103611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561012b5761012b611b6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561061157600081815260208120601f850160051c81016020861015611c065750805b601f850160051c820191505b81811015611c2557828155600101611c12565b505050505050565b815167ffffffffffffffff811115611c4757611c4761137b565b611c5b81611c558454611b1b565b84611bdf565b602080601f831160018114611cae5760008415611c785750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611c25565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611cfb57888601518255948401946001909101908401611cdc565b5085821015611d3757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d7857611d78611b6e565b506001019056fea264697066735822122080296813bd20c3cf76760d4e2c23c639373eba336048094785c71af6d47a9b5a64736f6c63430008140033", + "numDeployments": 1, + "solcInputHash": "950621027b9d5cffdabde867c6602559", + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"contractRequirement\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.configSmartRequirement[]\",\"name\":\"contracts\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"struct LibCoinVending.ConfigPosition\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"RequirementsConfigured\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"getJoinRequirements\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"timesRefunded\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timesReleased\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timesFunded\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"contractAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"contractIds\",\"type\":\"uint256[]\"},{\"internalType\":\"enum LibCoinVending.ContractTypes[]\",\"name\":\"contractTypes\",\"type\":\"uint8[]\"},{\"internalType\":\"bool\",\"name\":\"_isConfigured\",\"type\":\"bool\"}],\"internalType\":\"struct LibCoinVending.ConditionReturn\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getJoinRequirementsByToken\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bet\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.NumericCondition\",\"name\":\"ethValues\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"contractId\",\"type\":\"uint256\"},{\"internalType\":\"enum LibCoinVending.ContractTypes\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"have\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"lock\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"burn\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"pay\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct LibCoinVending.TransactionProperties\",\"name\":\"bet\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.ContractCondition\",\"name\":\"contractRequirement\",\"type\":\"tuple\"}],\"internalType\":\"struct LibCoinVending.configSmartRequirement[]\",\"name\":\"contracts\",\"type\":\"tuple[]\"}],\"internalType\":\"struct LibCoinVending.ConfigPosition\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setJoinRequirements\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getJoinRequirements(uint256)\":{\"details\":\"Retrieves the join requirements for a specific game.\",\"params\":{\"gameId\":\"The ID of the game.\"},\"returns\":{\"_0\":\"The join requirements as a `LibCoinVending.ConditionReturn` struct.\"}},\"getJoinRequirementsByToken(uint256,address,uint256,uint8)\":{\"details\":\"Retrieves the join requirements for a specific token in a game.\",\"params\":{\"contractAddress\":\"The address of the contract.\",\"contractId\":\"The ID of the contract.\",\"contractType\":\"The type of the contract.\",\"gameId\":\"The ID of the game.\"},\"returns\":{\"_0\":\"The join requirements for the specified token.\"}},\"setJoinRequirements(uint256,((uint256,uint256,uint256,uint256,uint256),(address,uint256,uint8,((bytes,uint256),(bytes,uint256),(bytes,uint256),(bytes,uint256),(bytes,uint256)))[]))\":{\"details\":\"Sets the join requirements for a specific game. Only the game creator can call this function. The game must be in the pre-registration stage.\",\"params\":{\"config\":\"The configuration position for the join requirements.\",\"gameId\":\"The ID of the game.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/facets/RankifyInstanceRequirementsFacet.sol\":\"RankifyInstanceRequirementsFacet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC1155/IERC1155.sol\\\";\\n\",\"keccak256\":\"0x10a6688bc4154b1b76268dbaf497bd8b24f77525ecb9cf829bd3cccec98eefc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] memory accounts,\\n uint256[] memory ids\\n ) public view virtual override returns (uint256[] memory) {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(address account, uint256 id, uint256 value) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner or approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0x45381337dbccfb58e9443257ba1850070be892ecacd4b0da7db4c4cfa7df0b09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n _spendAllowance(account, _msgSender(), amount);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS =\\n 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n consoleAddress,\\n add(payload, 32),\\n mload(payload),\\n 0,\\n 0\\n )\\n )\\n }\\n }\\n\\n function _castToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castToPure(_sendLogPayloadImplementation)(payload);\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\\n\",\"keccak256\":\"0x7434453e6d3b7d0e5d0eb7846ffdbc27f0ccf3b163591263739b628074dc103a\",\"license\":\"MIT\"},\"src/facets/RankifyInstanceRequirementsFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibRankify} from \\\"../libraries/LibRankify.sol\\\";\\n\\ncontract RankifyInstanceRequirementsFacet {\\n using LibTBG for uint256;\\n using LibRankify for uint256;\\n using LibTBG for LibTBG.GameInstance;\\n event RequirementsConfigured(uint256 indexed gameId, LibCoinVending.ConfigPosition config);\\n\\n /**\\n * @dev Sets the join requirements for a specific game.\\n * Only the game creator can call this function.\\n * The game must be in the pre-registration stage.\\n *\\n * @param gameId The ID of the game.\\n * @param config The configuration position for the join requirements.\\n */\\n function setJoinRequirements(uint256 gameId, LibCoinVending.ConfigPosition memory config) public {\\n gameId.enforceIsGameCreator(msg.sender);\\n gameId.enforceIsPreRegistrationStage();\\n LibCoinVending.configure(bytes32(gameId), config);\\n emit RequirementsConfigured(gameId, config);\\n }\\n\\n /**\\n * @dev Retrieves the join requirements for a specific game.\\n * @param gameId The ID of the game.\\n * @return The join requirements as a `LibCoinVending.ConditionReturn` struct.\\n */\\n function getJoinRequirements(uint256 gameId) public view returns (LibCoinVending.ConditionReturn memory) {\\n return LibCoinVending.getPosition(bytes32(gameId));\\n }\\n\\n /**\\n * @dev Retrieves the join requirements for a specific token in a game.\\n * @param gameId The ID of the game.\\n * @param contractAddress The address of the contract.\\n * @param contractId The ID of the contract.\\n * @param contractType The type of the contract.\\n * @return The join requirements for the specified token.\\n */\\n function getJoinRequirementsByToken(\\n uint256 gameId,\\n address contractAddress,\\n uint256 contractId,\\n LibCoinVending.ContractTypes contractType\\n ) public view returns (LibCoinVending.ContractCondition memory) {\\n return LibCoinVending.getPositionByContract(bytes32(gameId), contractAddress, contractId, contractType);\\n }\\n}\\n\",\"keccak256\":\"0x2324a94d8991f782e3e0458d6c41a4ad88a7e64c98968c01bb1704e1d7204ea6\",\"license\":\"MIT\"},\"src/interfaces/ILockableERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {IERC1155} from \\\"@openzeppelin/contracts/interfaces/IERC1155.sol\\\";\\n\\n/**\\n * @title ILockableERC1155\\n * @dev Interface for a lockable ERC1155 token contract.\\n */\\ninterface ILockableERC1155 is IERC1155 {\\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\\n\\n /**\\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\\n *\\n * emits a _TokensLocked_ event.\\n */\\n function lock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\\n *\\n * emits a _TokensUnlocked_ event.\\n */\\n function unlock(address account, uint256 id, uint256 amount) external;\\n\\n /**\\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\\n *\\n * Returns:\\n *\\n * - The unlocked balance of tokens.\\n */\\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9de2414bc89206b0248dd0b0c75e40d0caf0260e2826fa8113e92be813d07cee\",\"license\":\"MIT\"},\"src/interfaces/IRankToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {ILockableERC1155} from \\\"./ILockableERC1155.sol\\\";\\n\\ninterface IRankToken is ILockableERC1155 {\\n event RankingInstanceUpdated(address indexed newRankingInstance);\\n\\n event LevelUp(address indexed account, uint256 id);\\n\\n /**\\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\\n */\\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\\n\\n /**\\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\\n */\\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\\n\\n /**\\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\\n *\\n * emits a _LevelUp_ event.\\n */\\n function levelUp(address to, uint256 id, bytes memory data) external;\\n\\n /**\\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\\n *\\n * emits a _RankingInstanceUpdated_ event.\\n */\\n function updateRankingInstance(address newRankingInstance) external;\\n\\n /**\\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\\n *\\n * Returns:\\n *\\n * - The address of the ranking instance.\\n */\\n function getRankingInstance() external view returns (address);\\n\\n /**\\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\\n * It checks the balance of the account and returns the new rank that can be upgraded to.\\n *\\n * Returns:\\n *\\n * - The new rank of the account.\\n */\\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\\n\\n /**\\n * @dev Gets the rank of an account. `account` is the address of the account.\\n *\\n * Returns:\\n *\\n * - The rank of the account.\\n */\\n function getAccountRank(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x965213394c22a092747e73454db10e9c88c6abfba8069cfa57c3816495088ecf\",\"license\":\"MIT\"},\"src/interfaces/IRankifyInstanceCommons.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {LibCoinVending} from \\\"../libraries/LibCoinVending.sol\\\";\\nimport {LibQuadraticVoting} from \\\"../libraries/LibQuadraticVoting.sol\\\";\\n\\ninterface IRankifyInstanceCommons {\\n struct Score {\\n address participant;\\n uint256 score;\\n }\\n\\n struct RInstanceSettings {\\n uint256 gamePrice;\\n address gamePaymentToken;\\n uint256 joinGamePrice;\\n uint256 numGames;\\n address rankTokenAddress;\\n bool contractInitialized;\\n LibQuadraticVoting.qVotingStruct voting;\\n }\\n\\n struct RInstanceState {\\n RInstanceSettings BestOfState;\\n LibTBG.GameSettings TBGSEttings;\\n }\\n\\n struct VoteHidden {\\n bytes32 hash;\\n bytes proof;\\n }\\n\\n struct RInstance {\\n uint256 rank;\\n address createdBy;\\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\\n uint256 numOngoingProposals;\\n uint256 numPrevProposals;\\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\\n uint256 numCommitments;\\n mapping(address => VoteHidden) votesHidden;\\n address[] additionalRanks;\\n uint256 paymentsBalance;\\n uint256 numVotesThisTurn;\\n uint256 numVotesPrevTurn;\\n mapping(address => bool) playerVoted;\\n }\\n\\n event RegistrationOpen(uint256 indexed gameid);\\n event PlayerJoined(uint256 indexed gameId, address participant);\\n event GameStarted(uint256 indexed gameId);\\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\\n event GameClosed(uint256 indexed gameId);\\n event PlayerLeft(uint256 indexed gameId, address indexed player);\\n}\\n\",\"keccak256\":\"0x6c88be091650f80b5a4c10a89ac346d04afe1d59a137fa4a475a2a1ac62a1505\",\"license\":\"MIT\"},\"src/libraries/LibArray.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibArray {\\n /**\\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\\n *\\n * Requirements:\\n *\\n * - The array to be sorted must not be empty.\\n * - The starting and ending indices must be within the bounds of the array.\\n *\\n * Modifies:\\n *\\n * - The array is sorted in ascending order.\\n *\\n * Note:\\n *\\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\\n */\\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (arr[uint256(i)] > pivot) i++;\\n while (pivot > arr[uint256(j)]) j--;\\n if (i <= j) {\\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) quickSort(arr, left, j);\\n if (i < right) quickSort(arr, i, right);\\n }\\n}\\n\",\"keccak256\":\"0xf799fad0749d882a0e3977748bee081e924909e6987d14735758c829816496e7\",\"license\":\"MIT\"},\"src/libraries/LibCoinVending.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Tim Pechersky <@Peersky>\\n\\npragma solidity ^0.8.20;\\n\\nimport {MockERC20} from \\\"../mocks/MockERC20.sol\\\";\\nimport {ERC1155Burnable} from \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\n\\n/**\\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\\n * - Allows for each individual asset action promise can be one of following:\\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\\n * - Allows three actions:\\n * - Fund position with assets\\n * - Refund assets to user\\n * - Consume assets and provide goods to user\\n * - Consuming asset might take a form of\\n * - Transferring assets to payee\\n * - Burning assets\\n * - Awarding beneficiary with assets\\n * - Returning locked assets back to sender\\n *\\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\\n * This is to be stored within implementation contract.\\n *\\n *\\n * !!!!! IMPORTANT !!!!!\\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\\n * Reentrancy guards MUST be implemented in an implementing contract.\\n *\\n * Usage:\\n *\\n * 0. Configure position via configure(...)\\n * 1. fund position with assets via fund(...)\\n * 2. release or refund assets via release(...) or refund(...)\\n * 3. repeat steps 1 and 2 as needed.\\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\\n *\\n *\\n * Test state:\\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\\n *\\n * ERC721 token is checked only for \\\"HAVE\\\" condition since putting requirements on non fungable token id yet to be resolved.\\n * (see ERC721 section in the code below)\\n *\\n * This library has not been yet audited\\n *\\n */\\nlibrary LibCoinVending {\\n struct Condition {\\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n ContractTypes[] contractTypes;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n bool _isConfigured;\\n }\\n enum RequirementTypes {\\n HAVE,\\n LOCK,\\n BURN,\\n BET,\\n PAY\\n }\\n\\n struct TransactionProperties {\\n bytes data;\\n uint256 amount;\\n }\\n struct ContractCondition {\\n TransactionProperties have;\\n TransactionProperties lock;\\n TransactionProperties burn;\\n TransactionProperties pay;\\n TransactionProperties bet;\\n }\\n\\n struct NumericCondition {\\n uint256 have;\\n uint256 lock;\\n uint256 burn;\\n uint256 pay;\\n uint256 bet;\\n }\\n\\n enum TransferTypes {\\n FUND,\\n REFUND,\\n RELEASE\\n }\\n\\n struct ConditionReturn {\\n NumericCondition ethValues;\\n uint256 timesRefunded;\\n uint256 timesReleased;\\n uint256 timesFunded;\\n address[] contractAddresses;\\n uint256[] contractIds;\\n ContractTypes[] contractTypes;\\n bool _isConfigured;\\n }\\n\\n struct configSmartRequirement {\\n address contractAddress;\\n uint256 contractId;\\n ContractTypes contractType;\\n ContractCondition contractRequirement;\\n }\\n\\n struct ConfigPosition {\\n NumericCondition ethValues;\\n configSmartRequirement[] contracts;\\n }\\n\\n struct LibCoinVendingStorage {\\n mapping(bytes32 => Condition) positions;\\n address beneficiary;\\n }\\n\\n enum ContractTypes {\\n ERC20,\\n ERC1155,\\n ERC721\\n }\\n\\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\\\"coin.vending.storage.position\\\");\\n\\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\\n }\\n\\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n /**\\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\\n *\\n * Requirements:\\n *\\n * - The `value` must be non-zero.\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\\n */\\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\\n MockERC20 token = MockERC20(erc20Addr);\\n if (value != 0) {\\n if (from == address(this)) {\\n if (to != address(0)) {\\n token.transfer(to, value);\\n } else {\\n token.burn(value);\\n }\\n } else {\\n if (to != address(0)) {\\n token.transferFrom(from, to, value);\\n } else {\\n token.transferFrom(from, address(this), value);\\n token.burn(value);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must have a sufficient token balance.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token balances of the `from` and `to` addresses.\\n */\\n function fulfillERC20(\\n address erc20Addr,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\\n MockERC20 token = MockERC20(erc20Addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0 && from != address(this)) {\\n require(token.balanceOf(from) >= value, \\\"Not enough erc20 tokens\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n *\\n * Notes:\\n *\\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\\n * I think best approach would be to split in to two methods:\\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\\n * Two possible solutions:\\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\\n\\n */\\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\\n ERC721 token = ERC721(erc721addr);\\n\\n require(\\n tokenReq.lock.amount == 0 &&\\n tokenReq.burn.amount == 0 &&\\n tokenReq.pay.amount == 0 &&\\n tokenReq.bet.amount == 0,\\n \\\"ERC721 transfers not supported\\\"\\n );\\n if (tokenReq.have.amount != 0 && from != address(this)) {\\n uint256 balance = token.balanceOf(from);\\n require(balance >= tokenReq.have.amount, \\\"Not enough ERC721 balance\\\");\\n }\\n }\\n\\n /**\\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\\n *\\n * Requirements:\\n *\\n * - The `from` address must own the token.\\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\\n *\\n * Modifies:\\n *\\n * - The token ownership from the `from` address to the `to` address.\\n */\\n function fulfillERC1155(\\n address erc1155addr,\\n uint256 id,\\n ContractCondition storage tokenReq,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\\n uint256 value = tokenReq.have.amount;\\n if (value != 0) {\\n uint256 balance = token.balanceOf(from, id);\\n require(balance >= value, \\\"ERC1155 balance is not valid\\\");\\n }\\n value = tokenReq.pay.amount;\\n if (value != 0) {\\n // token.transfe\\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\\n }\\n value = tokenReq.bet.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\\n }\\n value = tokenReq.burn.amount;\\n if (value != 0) {\\n if (burnAddress == address(0)) {\\n token.burn(from, id, value);\\n } else {\\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\\n }\\n }\\n value = tokenReq.lock.amount;\\n if (value != 0) {\\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\\n }\\n }\\n\\n /**\\n * @dev Fulfills the conditions of a position.\\n *\\n * Requirements:\\n *\\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\\n *\\n * Modifies:\\n *\\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\\n */\\n function fulfill(\\n Condition storage position,\\n address from,\\n address payee,\\n address beneficiary,\\n address burnAddress,\\n address lockAddress\\n ) private {\\n if (from == address(this)) {\\n if (position.ethValues.lock != 0) {\\n payable(lockAddress).transfer(position.ethValues.lock);\\n }\\n if (position.ethValues.pay != 0) {\\n payable(payee).transfer(position.ethValues.pay);\\n }\\n if (position.ethValues.bet != 0) {\\n payable(beneficiary).transfer(position.ethValues.bet);\\n }\\n if (position.ethValues.burn != 0) {\\n payable(burnAddress).transfer(position.ethValues.burn);\\n }\\n } else {\\n uint256 VLReq = position.ethValues.lock +\\n position.ethValues.pay +\\n position.ethValues.bet +\\n position.ethValues.burn;\\n require(msg.value >= VLReq, \\\"msg.value too low\\\");\\n }\\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\\n address contractAddress = position.contractAddresses[i];\\n uint256 id = position.contractIds[i];\\n ContractTypes contractType = position.contractTypes[i];\\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\\n if (contractType == ContractTypes.ERC20) {\\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n } else if (contractType == ContractTypes.ERC721) {\\n fulfillERC72Balance(\\n contractAddress,\\n // id,\\n requirement,\\n from\\n // payee,\\n // beneficiary,\\n // burnAddress,\\n // lockAddress\\n );\\n } else if (contractType == ContractTypes.ERC1155) {\\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\\n }\\n }\\n }\\n\\n /**\\n * @dev Refunds the balance of a condition to the specified address.\\n *\\n * `reqPos` The storage reference to the condition.\\n * `to` The address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function _refund(Condition storage reqPos, address to) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to refund\\\");\\n fulfill(reqPos, address(this), to, to, to, to);\\n reqPos.timesRefunded += 1;\\n }\\n\\n /**\\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `to` address.\\n * - Increments the `timesRefunded` counter for the condition.\\n */\\n function refund(bytes32 position, address to) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _refund(reqPos, to);\\n }\\n\\n /**\\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n _refund(reqPos, returnAddresses[i]);\\n }\\n }\\n\\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \\\"Not enough balance to release\\\");\\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\\n reqPos.timesReleased += 1;\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\\n * - Increments the `timesReleased` counter for the condition.\\n */\\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _release(reqPos, payee, beneficiary, returnAddress);\\n }\\n\\n /**\\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\\n *\\n * Requirements:\\n *\\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\\n *\\n * Modifies:\\n *\\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\\n */\\n function batchRelease(\\n bytes32 position,\\n address payee,\\n address beneficiary,\\n address[] memory returnAddresses\\n ) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n for (uint256 i = 0; i < returnAddresses.length; i++) {\\n {\\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\\n }\\n }\\n }\\n\\n function _fund(Condition storage reqPos, address funder) private {\\n require(reqPos._isConfigured, \\\"Position does not exist\\\");\\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\\n reqPos.timesFunded += 1;\\n }\\n\\n /**\\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must be configured.\\n *\\n * Modifies:\\n *\\n * - Transfers the funds from `msg.sender` to this contract.\\n * - Increments the `timesFunded` counter for the condition.\\n */\\n function fund(bytes32 position) internal {\\n Condition storage reqPos = coinVendingPosition(position);\\n _fund(reqPos, msg.sender);\\n }\\n\\n /**\\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\\n *\\n * Requirements:\\n *\\n * - The condition must not have a positive balance.\\n *\\n * Modifies:\\n *\\n * - Sets the configuration of the condition to `configuration`.\\n */\\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\\n Condition storage mustDo = coinVendingPosition(position);\\n require(\\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\\n \\\"Cannot mutate position with currently positive balance\\\"\\n );\\n mustDo.ethValues = configuration.ethValues;\\n delete mustDo.contractAddresses;\\n delete mustDo.contractIds;\\n delete mustDo.contractTypes;\\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\\n mustDo.contractIds.push(configuration.contracts[i].contractId);\\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\\n configuration.contracts[i].contractId\\n ] = configuration.contracts[i].contractRequirement;\\n }\\n mustDo._isConfigured = true;\\n }\\n\\n /**\\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\\n *\\n * Returns:\\n *\\n * - The condition associated with `position`.\\n */\\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\\n Condition storage pos = coinVendingPosition(position);\\n ConditionReturn memory ret;\\n ret.ethValues = pos.ethValues;\\n ret.timesFunded = pos.timesFunded;\\n ret.timesRefunded = pos.timesRefunded;\\n ret.timesReleased = pos.timesReleased;\\n ret._isConfigured = pos._isConfigured;\\n ret.contractAddresses = pos.contractAddresses;\\n ret.contractIds = pos.contractIds;\\n ret.contractTypes = pos.contractTypes;\\n return ret;\\n }\\n\\n /**\\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\\n *\\n * Returns:\\n *\\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\\n */\\n function getPositionByContract(\\n bytes32 position,\\n address contractAddress,\\n uint256 contractId,\\n ContractTypes contractType\\n ) internal view returns (ContractCondition memory) {\\n Condition storage pos = coinVendingPosition(position);\\n return pos.contracts[contractType][contractAddress][contractId];\\n }\\n}\\n\",\"keccak256\":\"0xec8afb87a245f5709fa347ed2694359afe934e81e4c742ae2bacad6cece20a2d\",\"license\":\"MIT\"},\"src/libraries/LibQuadraticVoting.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\\n\\n/**\\n * @title LibQuadraticVoting\\n * @dev A library for quadratic voting calculations.\\n */\\nlibrary LibQuadraticVoting {\\n struct qVotingStruct {\\n uint256 voteCredits;\\n uint256 maxQuadraticPoints;\\n uint256 minQuadraticPositons;\\n }\\n\\n /**\\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\\n *\\n * Returns:\\n *\\n * - A `qVotingStruct` containing the precomputed values.\\n */\\n function precomputeValues(\\n uint256 voteCredits,\\n uint256 minExpectedVoteItems\\n ) internal pure returns (qVotingStruct memory) {\\n qVotingStruct memory q;\\n\\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\\n\\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\\n uint256 iterator = 0;\\n uint256 accumulator = 0;\\n do {\\n iterator++;\\n accumulator += iterator ** 2;\\n } while (accumulator < voteCredits);\\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\\n if (accumulator != voteCredits) require(false, \\\"quadraticVotingError\\\"); //revert quadraticVotingError(\\\"voteCredits bust be i^2 series\\\", accumulator, voteCredits);\\n q.minQuadraticPositons = iterator;\\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \\\"quadraticVotingError\\\");\\n // revert quadraticVotingError(\\n // \\\"Minimum Voting positions above min players\\\",\\n // q.minQuadraticPositons,\\n // minExpectedVoteItems\\n // );\\n q.voteCredits = voteCredits;\\n return q;\\n }\\n\\n /**\\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\\n *\\n * Returns:\\n *\\n * - An array of scores for each proposal.\\n */\\n function computeScoresByVPIndex(\\n qVotingStruct memory q,\\n uint256[][] memory VotersVotes,\\n bool[] memory voterVoted,\\n uint256 notVotedGivesEveyone,\\n uint256 proposalsLength\\n ) internal pure returns (uint256[] memory) {\\n uint256[] memory scores = new uint256[](proposalsLength);\\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\\n\\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\\n //For each proposal\\n scores[proposalIdx] = 0;\\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\\n // For each potential voter\\n uint256[] memory voterVotes = VotersVotes[vi];\\n if (!voterVoted[vi]) {\\n // Check if voter wasn't voting\\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\\n creditsUsed[vi] = q.voteCredits;\\n } else {\\n //If voter voted\\n scores[proposalIdx] += voterVotes[proposalIdx];\\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\\n if (creditsUsed[vi] > q.voteCredits) require(false, \\\"quadraticVotingError\\\"); // revert quadraticVotingError(\\\"Quadratic: vote credits overrun\\\", q.voteCredits, creditsUsed[vi]);\\n }\\n }\\n }\\n return scores;\\n }\\n}\\n\",\"keccak256\":\"0x31c9d1ce5cd4d5829272c78a57b426a1fd45b9d649d555cba4f0835d5a3a85ef\",\"license\":\"MIT\"},\"src/libraries/LibRankify.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\nimport {LibTBG} from \\\"../libraries/LibTurnBasedGame.sol\\\";\\nimport {IRankifyInstanceCommons} from \\\"../interfaces/IRankifyInstanceCommons.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IRankToken} from \\\"../interfaces/IRankToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {LibQuadraticVoting} from \\\"./LibQuadraticVoting.sol\\\";\\nimport \\\"hardhat/console.sol\\\";\\n\\nlibrary LibRankify {\\n using LibTBG for LibTBG.GameInstance;\\n using LibTBG for uint256;\\n using LibTBG for LibTBG.GameSettings;\\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\\n\\n /**\\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\\n *\\n * Returns:\\n *\\n * - `true` if the strings are equal, `false` otherwise.\\n */\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n /**\\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game storage for `gameId`.\\n */\\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\\n bytes32 position = LibTBG.getGameDataStorage(gameId);\\n assembly {\\n game.slot := position\\n }\\n }\\n\\n /**\\n * @dev Returns the Rankify InstanceSettings storage.\\n *\\n * Returns:\\n *\\n * - The RInstanceSettings storage.\\n */\\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\\n bytes32 position = LibTBG.getDataStorage();\\n assembly {\\n bog.slot := position\\n }\\n }\\n\\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\\n keccak256(\\\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\\\");\\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\\n keccak256(\\\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\\\");\\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\\n keccak256(\\\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\\\");\\n\\n /**\\n * @dev Ensures that the contract is initialized.\\n *\\n * Requirements:\\n *\\n * - The contract must be initialized.\\n */\\n function enforceIsInitialized() internal view {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n require(settings.contractInitialized, \\\"onlyInitialized\\\");\\n }\\n\\n /**\\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n */\\n function enforceGameExists(uint256 gameId) internal view {\\n enforceIsInitialized();\\n require(gameId.gameExists(), \\\"no game found\\\");\\n }\\n\\n /**\\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gameRank` must not be 0.\\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Creates a new game with `gameId`.\\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\\n * - Sets the payments balance of the game to the game price.\\n * - Sets the creator of the game to `creator`.\\n * - Increments the number of games.\\n * - Sets the rank of the game to `gameRank`.\\n * - Mints new rank tokens.\\n */\\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\\n LibRankify.enforceIsInitialized();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(gameRank != 0, \\\"game rank not specified\\\");\\n if (settings.gamePrice != 0) {\\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\\n game.paymentsBalance = settings.gamePrice;\\n }\\n\\n game.createdBy = creator;\\n settings.numGames += 1;\\n game.rank = gameRank;\\n\\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\\n rankTokenContract.mint(address(this), 1, gameRank + 1, \\\"\\\");\\n rankTokenContract.mint(address(this), 3, gameRank, \\\"\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the creator of the game.\\n */\\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n require(game.createdBy == candidate, \\\"Only game creator\\\");\\n }\\n\\n /**\\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `candidate` must be the game master of the game.\\n */\\n function enforceIsGM(uint256 gameId, address candidate) internal view {\\n enforceGameExists(gameId);\\n require(gameId.getGM() == candidate, \\\"Only game master\\\");\\n }\\n\\n /**\\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Requirements:\\n *\\n * - `RankTokenAddress` must support `IRankToken` interface\\n *\\n * Modifies:\\n *\\n * - Locks `gameRank` rank of `player` in the rank token contract.\\n */\\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.lock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\\n *\\n * Modifies:\\n *\\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\\n * - Increases the payments balance of the game by the join game price.\\n * - Adds `player` to the game.\\n */\\n function joinGame(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n fulfillRankRq(gameId, player);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance += _RInstance.joinGamePrice;\\n }\\n gameId.addPlayer(player);\\n }\\n\\n /**\\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Emits rank rewards for the game.\\n * - Removes and unlocks each player from the game.\\n * - Calls `playersGameEndedCallback` for each player.\\n * - Transfers the game's balance to `beneficiary`.\\n *\\n * Returns:\\n *\\n * - The final scores of the game.\\n */\\n function closeGame(\\n uint256 gameId,\\n address beneficiary,\\n function(uint256, address) playersGameEndedCallback\\n ) internal returns (uint256[] memory) {\\n enforceGameExists(gameId);\\n emitRankRewards(gameId, gameId.getLeaderBoard());\\n (, uint256[] memory finalScores) = gameId.getScores();\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n removeAndUnlockPlayer(gameId, players[i]);\\n playersGameEndedCallback(gameId, players[i]);\\n }\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\\n IERC20(_RInstance.gamePaymentToken).transfer(\\n beneficiary,\\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\\n );\\n return finalScores;\\n }\\n\\n /**\\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\\n * - Removes and unlocks `player` from the game.\\n * - Calls `onPlayerLeftCallback` for `player`.\\n */\\n function quitGame(\\n uint256 gameId,\\n address player,\\n bool slash,\\n function(uint256, address) onPlayerLeftCallback\\n ) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n if (_RInstance.joinGamePrice != 0) {\\n uint256 divideBy = slash ? 2 : 1;\\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n game.paymentsBalance -= paymentRefund;\\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\\n }\\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\\n onPlayerLeftCallback(gameId, player);\\n }\\n\\n /**\\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Calls `quitGame` for each player in the game.\\n * - Transfers half of the game's payment to the game creator.\\n * - Decreases the game's payments balance by the refund amount.\\n * - Transfers the remaining balance of the game to `beneficiary`.\\n * - Deletes the game.\\n */ function cancelGame(\\n uint256 gameId,\\n function(uint256, address) onPlayerLeftCallback,\\n address beneficiary\\n ) internal {\\n // Cancel the game for each player\\n address[] memory players = gameId.getPlayers();\\n for (uint256 i = 0; i < players.length; i++) {\\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\\n }\\n\\n // Refund payment to the game creator\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\\n uint256 paymentRefund = _RInstance.gamePrice / 2;\\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\\n game.paymentsBalance -= paymentRefund;\\n\\n // Transfer remaining payments balance to the beneficiary\\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\\n game.paymentsBalance = 0;\\n\\n // Delete the game\\n gameId.deleteGame();\\n }\\n\\n /**\\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Modifies:\\n *\\n * - Locks the rank token(s) of `player` in the rank token contract.\\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\\n */\\n function fulfillRankRq(uint256 gameId, address player) internal {\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\\n */\\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \\\"\\\");\\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \\\"\\\");\\n }\\n\\n /**\\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\\n *\\n * Modifies:\\n *\\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\\n */\\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\\n }\\n }\\n\\n /**\\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\\n *\\n * Modifies:\\n *\\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\\n */\\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\\n IRankToken rankToken = IRankToken(rankTokenAddress);\\n rankToken.unlock(player, gameRank, 1);\\n }\\n\\n /**\\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Removes `player` from the game.\\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\\n */\\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\\n enforceGameExists(gameId);\\n gameId.removePlayer(player); //This will throw if game is in the process\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n if (game.rank > 1) {\\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\\n }\\n }\\n }\\n\\n /**\\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\\n * The \\\"move\\\" is considered to be a state when player has made all actions he could in the given turn.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\\n * - Otherwise, makes a move for `player` and returns `true`.\\n */\\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\\n uint256 turn = gameId.getTurn();\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n bool expectVote = true;\\n bool expectProposal = true;\\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\\n bool madeMove = true;\\n if (expectVote && !game.playerVoted[player]) madeMove = false;\\n if (expectProposal && game.proposalCommitmentHashes[player] == \\\"\\\") madeMove = false;\\n if (madeMove) gameId.playerMove(player);\\n return madeMove;\\n }\\n\\n /**\\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\\n *\\n * Returns:\\n *\\n * - An array of updated scores for each player.\\n * - An array of scores calculated for the current round.\\n */\\n function calculateScoresQuadratic(\\n uint256 gameId,\\n uint256[][] memory votesRevealed,\\n uint256[] memory proposerIndicies\\n ) internal returns (uint256[] memory, uint256[] memory) {\\n address[] memory players = gameId.getPlayers();\\n uint256[] memory scores = new uint256[](players.length);\\n uint256[] memory roundScores = new uint256[](players.length);\\n bool[] memory playerVoted = new bool[](players.length);\\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\\n // Convert mappiing to array to pass it to libQuadratic\\n for (uint256 i = 0; i < players.length; i++) {\\n playerVoted[i] = game.playerVoted[players[i]];\\n }\\n roundScores = settings.voting.computeScoresByVPIndex(\\n votesRevealed,\\n playerVoted,\\n settings.voting.maxQuadraticPoints,\\n proposerIndicies.length\\n );\\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\\n //for each player\\n if (proposerIndicies[playerIdx] < players.length) {\\n //if player proposal exists\\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\\n gameId.setScore(players[playerIdx], scores[playerIdx]);\\n } else {\\n //Player did not propose\\n }\\n }\\n return (scores, roundScores);\\n }\\n}\\n\",\"keccak256\":\"0x7f7497cbc8afe4dac2466d2a56e4ff67f8760326f486a46256d652019edb9195\",\"license\":\"MIT\"},\"src/libraries/LibTurnBasedGame.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.20;\\n\\nimport \\\"hardhat/console.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n// import {EnumerableMap} from \\\"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC1155} from \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {LibArray} from \\\"../libraries/LibArray.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title LibTBG\\n * @dev Library for managing turn-based games.\\n * It is designed to be used as a base library for games, and provides the following functionality:\\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\\n *\\n * Limitations:\\n * - It is assumed there is only one game per player\\n * - It is assumed there is only on game master per game\\n *\\n * ***WARNING*** Some limitations:\\n * - This library is still under development and its interfaces may change.\\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\\n *\\n */\\nlibrary LibTBG {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n struct GameSettings {\\n uint256 timePerTurn;\\n uint256 maxPlayersSize;\\n uint256 minPlayersSize;\\n uint256 timeToJoin;\\n uint256 maxTurns;\\n uint256 numWinners;\\n uint256 voteCredits;\\n string subject;\\n }\\n\\n struct GameInstance {\\n address gameMaster;\\n uint256 currentTurn;\\n uint256 turnStartedAt;\\n uint256 registrationOpenAt;\\n bool hasStarted;\\n bool hasEnded;\\n EnumerableSet.AddressSet players;\\n mapping(address => bool) madeMove;\\n uint256 numPlayersMadeMove;\\n mapping(address => uint256) score;\\n bytes32 implemenationStoragePointer;\\n bool isOvertime;\\n address[] leaderboard;\\n }\\n\\n struct TBGStorageStruct {\\n GameSettings settings;\\n mapping(uint256 => GameInstance) games;\\n mapping(address => uint256) playerInGame;\\n uint256 totalGamesCreated;\\n }\\n\\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\\\"turnbasedgame.storage.position\\\");\\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\\\"implementation.turnbasedgame.storage.position\\\");\\n\\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\\n bytes32 position = TBG_STORAGE_POSITION;\\n assembly {\\n es.slot := position\\n }\\n }\\n\\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.games[gameId];\\n }\\n\\n /**\\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\\n *\\n * Requirements:\\n *\\n * - `settings.timePerTurn` must not be zero.\\n * - `settings.maxPlayersSize` must not be zero.\\n * - `settings.minPlayersSize` must be at least 2.\\n * - `settings.maxTurns` must not be zero.\\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\\n * - `settings.timeToJoin` must not be zero.\\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\\n * - `settings.subject` must not be an empty string.\\n *\\n * Modifies:\\n *\\n * - Sets the settings of the game to `settings`.\\n */\\n function init(GameSettings memory settings) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (settings.timePerTurn == 0) require(false, \\\"settings.timePerTurn\\\"); // revert invalidConfiguration('timePerTurn');\\n if (settings.maxPlayersSize == 0) require(false, \\\"settings.maxPlayersSize\\\"); // revert invalidConfiguration('maxPlayersSize');\\n if (settings.minPlayersSize < 2) require(false, \\\"settings.minPlayersSize\\\"); //revert invalidConfiguration('minPlayersSize');\\n if (settings.maxTurns == 0) require(false, \\\"settings.maxTurns\\\"); //revert invalidConfiguration('maxTurns');\\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \\\"numWinners\\\"); //revert invalidConfiguration('numWinners');\\n if (settings.timeToJoin == 0) require(false, \\\"timeToJoin\\\"); // revert invalidConfiguration('timeToJoin');\\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \\\"maxPlayersSize\\\"); //revert invalidConfiguration('maxPlayersSize');\\n if (bytes(settings.subject).length == 0) require(false, \\\"subject length\\\"); //revert invalidConfiguration('subject length');\\n\\n tbg.settings = settings;\\n }\\n\\n /**\\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not already exist.\\n * - `gm` must not be the zero address.\\n * - `gameId` must not be zero.\\n * - The game master of the game with `gameId` must be the zero address.\\n *\\n * Modifies:\\n *\\n * - Sets the game master of the game with `gameId` to `gm`.\\n * - Increments the total number of games created.\\n */\\n function createGame(uint256 gameId, address gm) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(!gameExists(gameId), \\\"createGame->Already exists\\\");\\n require(gm != address(0), \\\"createGame->GM\\\");\\n require(gameId != 0, \\\"createGame->gameId\\\");\\n require(tbg.games[gameId].gameMaster == address(0), \\\"createGame->gameId\\\");\\n tbg.games[gameId].gameMaster = gm;\\n tbg.totalGamesCreated += 1;\\n\\n //totalGamesCreated ensures nonce-like behaviur:\\n //even if game would get deleted and re-created with same name, data storage would be different\\n tbg.games[gameId].implemenationStoragePointer = keccak256(\\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\\n );\\n }\\n\\n /**\\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the game master, current turn, hasEnded, hasStarted,\\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\\n * to their initial values.\\n * - Sets the score and madeMove of each player in the game with `gameId`\\n * to their initial values.\\n */\\n function deleteGame(uint256 gameId) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n address[] memory players = _game.players.values();\\n for (uint256 i = 0; i < players.length; i++) {\\n tbg.games[gameId].score[players[i]] = 0;\\n tbg.games[gameId].madeMove[players[i]] = false;\\n }\\n delete tbg.games[gameId].gameMaster;\\n delete tbg.games[gameId].currentTurn;\\n delete tbg.games[gameId].hasEnded;\\n delete tbg.games[gameId].hasStarted;\\n delete tbg.games[gameId].implemenationStoragePointer;\\n delete tbg.games[gameId].isOvertime;\\n delete tbg.games[gameId].leaderboard;\\n delete tbg.games[gameId].numPlayersMadeMove;\\n delete tbg.games[gameId].players;\\n delete tbg.games[gameId].registrationOpenAt;\\n delete tbg.games[gameId].turnStartedAt;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can be joined.\\n */\\n function canBeJoined(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must not already be in a game.\\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\\n * - The game with `gameId` must be joinable.\\n *\\n * Modifies:\\n *\\n * - Adds `participant` to the players of the game with `gameId`.\\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\\n * - Sets the game of `participant` to `gameId`.\\n */\\n function addPlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameExists(gameId), \\\"addPlayer->invalid game\\\");\\n\\n require(tbg.playerInGame[participant] == 0, \\\"addPlayer->Player in game\\\");\\n GameInstance storage _game = _getGame(gameId);\\n require(_game.players.length() < tbg.settings.maxPlayersSize, \\\"addPlayer->party full\\\");\\n\\n require(canBeJoined(gameId), \\\"addPlayer->cant join now\\\");\\n _game.players.add(participant);\\n _game.madeMove[participant] = false;\\n tbg.playerInGame[participant] = gameId;\\n }\\n\\n /**\\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the player is in the game.\\n */\\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.playerInGame[player] == gameId ? true : false;\\n }\\n\\n /**\\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - `participant` must be in the game with `gameId`.\\n * - The game with `gameId` must not have started or must have ended.\\n *\\n * Modifies:\\n *\\n * - Sets the game of `participant` to 0.\\n * - Removes `participant` from the players of the game with `gameId`.\\n */\\n function removePlayer(uint256 gameId, address participant) internal {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n require(gameExists(gameId), \\\"game does not exist\\\");\\n require(tbg.playerInGame[participant] == gameId, \\\"Not in the game\\\");\\n require(_game.hasStarted == false || _game.hasEnded == true, \\\"Cannot leave once started\\\");\\n tbg.playerInGame[participant] = 0;\\n _game.players.remove(participant);\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn has timed out.\\n */\\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n assert(_game.hasStarted == true);\\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game exists.\\n */\\n function gameExists(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.gameMaster != address(0)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n */\\n function enforceHasStarted(uint256 gameId) internal view {\\n GameInstance storage _game = _getGame(gameId);\\n assert(gameId != 0);\\n require(_game.hasStarted, \\\"Game has not yet started\\\");\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - `gameId` must not be zero.\\n * - The game with `gameId` must have started.\\n *\\n */\\n function canEndTurn(uint256 gameId) internal view returns (bool) {\\n bool turnTimedOut = isTurnTimedOut(gameId);\\n GameInstance storage _game = _getGame(gameId);\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (turnTimedOut) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn can end early.\\n */\\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\\n if (!_game.hasStarted || isGameOver(gameId)) return false;\\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The current turn in the game with `gameId` must be able to end.\\n */\\n modifier onlyInTurnTime(uint256 gameId) {\\n require(isTurnTimedOut(gameId) == false, \\\"onlyInTurnTime -> turn timedout\\\");\\n _;\\n }\\n\\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\\n require(canEndTurn(gameId) == true, \\\"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\\\");\\n _;\\n }\\n\\n /**\\n * @dev Clears the current moves in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of each player in `game` to false.\\n */\\n function _clearCurrentMoves(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n }\\n game.numPlayersMadeMove = 0;\\n }\\n\\n /**\\n * @dev Resets the states of the players in a game. `game` is the game.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove and score of each player in `game` to their initial values.\\n */\\n function _resetPlayerStates(GameInstance storage game) internal {\\n for (uint256 i = 0; i < game.players.length(); i++) {\\n address player = game.players.at(i);\\n game.madeMove[player] = false;\\n game.score[player] = 0;\\n }\\n }\\n\\n /**\\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the score of `player` in the game with `gameId` to `value`.\\n */\\n function setScore(uint256 gameId, address player, uint256 value) internal {\\n GameInstance storage _game = _getGame(gameId);\\n require(isPlayerInGame(gameId, player), \\\"player not in a game\\\");\\n _game.score[player] = value;\\n }\\n\\n /**\\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The score of `player` in the game with `gameId`.\\n */\\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.score[player];\\n }\\n\\n /**\\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n * - An array of the scores of the players in the game with `gameId`.\\n */\\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n address[] memory players = getPlayers(gameId);\\n uint256[] memory scores = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n scores[i] = getScore(gameId, players[i]);\\n }\\n return (players, scores);\\n }\\n\\n /**\\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n *\\n * Modifies:\\n *\\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\\n */\\n function openRegistration(uint256 gameId) internal {\\n require(gameExists(gameId), \\\"game not found\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _game.registrationOpenAt = block.timestamp;\\n }\\n\\n /**\\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether registration is open for the game.\\n */\\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.registrationOpenAt == 0) {\\n return false;\\n } else {\\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\\n }\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start.\\n */\\n function canStart(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n if (_game.hasStarted) return false;\\n if (_game.registrationOpenAt == 0) return false;\\n if (gameId == 0) return false;\\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\\n return true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game can start early.\\n */\\n function canStartEarly(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\\n return false;\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\\n * By \\\"early\\\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGameEarly(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n require(\\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\\n \\\"startGame->Not enough players\\\"\\n );\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must exist.\\n * - The game with `gameId` must not have started.\\n * - The game with `gameId` must have opened registration.\\n * - The current block timestamp must be greater than the registration open time plus the time to join.\\n *\\n * Modifies:\\n *\\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\\n * - Resets the states of the players in the game with `gameId`.\\n */\\n function startGame(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(_game.hasStarted == false, \\\"startGame->already started\\\");\\n require(_game.registrationOpenAt != 0, \\\"startGame->Game registration was not yet open\\\");\\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \\\"startGame->Still Can Join\\\");\\n require(gameId != 0, \\\"startGame->Game not found\\\");\\n require(_game.players.length() >= tbg.settings.minPlayersSize, \\\"startGame->Not enough players\\\");\\n _game.hasStarted = true;\\n _game.hasEnded = false;\\n _game.currentTurn = 1;\\n _game.turnStartedAt = block.timestamp;\\n _resetPlayerStates(_game);\\n }\\n\\n /**\\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The current turn of the game with `gameId`.\\n */\\n function getTurn(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.currentTurn;\\n }\\n\\n /**\\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game master of the game with `gameId`.\\n */\\n function getGM(uint256 gameId) internal view returns (address) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.gameMaster;\\n }\\n\\n /**\\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn in the game.\\n */\\n function isLastTurn(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is over.\\n */\\n function isGameOver(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n GameInstance storage _game = _getGame(gameId);\\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must not be over.\\n */\\n function enforceIsNotOver(uint256 gameId) internal view {\\n require(!isGameOver(gameId), \\\"Game over\\\");\\n }\\n\\n /**\\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must have started.\\n * - The game with `gameId` must not be over.\\n * - `player` must not have made a move in the current turn of the game with `gameId`.\\n * - `player` must be in the game with `gameId`.\\n *\\n * Modifies:\\n *\\n * - Sets the madeMove of `player` in the game with `gameId` to true.\\n * - Increments the numPlayersMadeMove of the game with `gameId`.\\n */\\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\\n GameInstance storage _game = _getGame(gameId);\\n enforceHasStarted(gameId);\\n enforceIsNotOver(gameId);\\n require(_game.madeMove[player] == false, \\\"already made a move\\\");\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n _game.madeMove[player] = true;\\n _game.numPlayersMadeMove += 1;\\n }\\n\\n /**\\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\\n *\\n * Requirements:\\n *\\n * - `player` must be in the game with `gameId`.\\n */\\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\\n TBGStorageStruct storage tbg = TBGStorage();\\n require(gameId == tbg.playerInGame[player], \\\"is not in the game\\\");\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game has started.\\n */\\n function hasStarted(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.hasStarted;\\n }\\n\\n /**\\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n */\\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.leaderboard;\\n }\\n\\n /**\\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\\n *\\n * Modifies:\\n *\\n * - Clears the current moves in the game with `gameId`.\\n * - Increments the currentTurn of the game with `gameId`.\\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the current turn is the last turn.\\n * - A boolean indicating whether the game is a tie.\\n * - A boolean indicating whether the game is over.\\n */\\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\\n require(canEndTurnEarly(gameId), \\\"nextTurn->CanEndEarly\\\");\\n GameInstance storage _game = _getGame(gameId);\\n _clearCurrentMoves(_game);\\n _game.currentTurn += 1;\\n _game.turnStartedAt = block.timestamp;\\n bool _isLastTurn = isLastTurn(gameId);\\n if (_isLastTurn || _game.isOvertime) {\\n bool _isTie = isTie(gameId);\\n _game.isOvertime = _isTie;\\n }\\n _game.hasEnded = isGameOver(gameId);\\n\\n (_game.leaderboard, ) = sortByScore(gameId);\\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\\n }\\n\\n /**\\n * @dev Gets the data storage pointer.\\n *\\n * Returns:\\n *\\n * - The data storage pointer.\\n */\\n function getDataStorage() internal pure returns (bytes32 pointer) {\\n return IMPLEMENTATION_STORAGE_POSITION;\\n }\\n\\n /**\\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The game data storage pointer of the game with `gameId`.\\n */\\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.implemenationStoragePointer;\\n }\\n\\n /**\\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - The number of players in the game with `gameId`.\\n */\\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.length();\\n }\\n\\n /**\\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`.\\n */\\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.players.values();\\n }\\n\\n /**\\n * @dev Gets the game settings.\\n *\\n * Returns:\\n *\\n * - The game settings.\\n */\\n function getGameSettings() internal view returns (GameSettings memory) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n return tbg.settings;\\n }\\n\\n /**\\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\\n *\\n * Requirements:\\n *\\n * - Registration must not be open for the game with `gameId`.\\n * - The game with `gameId` must not have started.\\n */\\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\\n require(!isRegistrationOpen(gameId), \\\"Cannot do when registration is open\\\");\\n require(!hasStarted(gameId), \\\"Cannot do when game started\\\");\\n }\\n\\n /**\\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to true.\\n */\\n function addOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = true;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is in overtime.\\n */\\n function isOvertime(uint256 gameId) internal view returns (bool) {\\n GameInstance storage _game = _getGame(gameId);\\n return _game.isOvertime;\\n }\\n\\n /**\\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\\n *\\n * Modifies:\\n *\\n * - Sets the isOvertime of the game with `gameId` to false.\\n */\\n function resetOvertime(uint256 gameId) internal {\\n GameInstance storage _game = _getGame(gameId);\\n _game.isOvertime = false;\\n }\\n\\n /**\\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\\n * Tie being defined as at least two of the top `numWinners` players having the same score.\\n *\\n * Returns:\\n *\\n * - A boolean indicating whether the game is a tie.\\n */\\n function isTie(uint256 gameId) internal view returns (bool) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n\\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\\n for (uint256 i = 0; i < players.length - 1; i++) {\\n if ((i <= tbg.settings.numWinners - 1)) {\\n if (scores[i] == scores[i + 1]) {\\n return (true);\\n }\\n } else {\\n break;\\n }\\n }\\n return (false);\\n }\\n\\n /**\\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\\n *\\n * Returns:\\n *\\n * - The game ID of the game `player` is in.\\n */\\n function getPlayersGame(address player) internal view returns (uint256) {\\n TBGStorageStruct storage tbg = TBGStorage();\\n\\n return tbg.playerInGame[player];\\n }\\n\\n /**\\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\\n *\\n * Modifies:\\n *\\n * - Sorts the `players` and `scores` arrays in place.\\n */\\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\\n int256 i = left;\\n int256 j = right;\\n if (i == j) return;\\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\\n while (i <= j) {\\n while (scores[uint256(i)] > pivot) i++;\\n while (pivot > scores[uint256(j)]) j--;\\n if (i <= j) {\\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\\n i++;\\n j--;\\n }\\n }\\n if (left < j) _quickSort(players, scores, left, j);\\n if (i < right) _quickSort(players, scores, i, right);\\n }\\n\\n /**\\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\\n *\\n * Returns:\\n *\\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\\n */\\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\\n _quickSort(players, scores, 0, int256(scores.length - 1));\\n return (players, scores);\\n }\\n}\\n\",\"keccak256\":\"0x9e5c01321d4e1f9102bd4638b5fc168a3aecae7d04de267838ca04848bebd81a\",\"license\":\"MIT\"},\"src/mocks/MockERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\npragma solidity ^0.8.20;\\n\\ncontract MockERC20 is ERC20Burnable, Ownable {\\n uint256 numTokens;\\n\\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\\n require(owner != address(0), \\\"must specify owner of the contract\\\");\\n transferOwnership(owner);\\n }\\n\\n function mint(address to, uint256 amount) public onlyOwner {\\n require(to != address(0), \\\"MockERC20->mint: Address not specified\\\");\\n require(amount != 0, \\\"MockERC20->mint: amount not specified\\\");\\n _mint(to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xed1f89d4961ad04a4b3966aeddd885577c5efd91199f39d41ab8f91af49cd24b\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611db5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80638f298b2a14610046578063bbb294f81461006f578063bf0f2d7e14610084575b600080fd5b61005961005436600461122d565b6100a4565b6040516100669190611368565b60405180910390f35b61008261007d366004611714565b6100c1565b005b6100976100923660046117dd565b61011a565b6040516100669190611918565b6100ac61107c565b6100b885858585610131565b95945050505050565b6100cb823361056f565b6100d482610616565b6100de828261074a565b817fcf4865028c280be4f5db8efbf51379eace06ea78a59dad8020a2ac3593b33fbb8260405161010e9190611a0e565b60405180910390a25050565b610122611126565b61012b82610bf8565b92915050565b61013961107c565b600061018e8660408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060008460028111156101a5576101a5611877565b60028111156101b6576101b6611877565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff89168252835281812087825290925290819020815160e081019092528054829060a082019083908290829061021490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461024090611b1b565b801561028d5780601f106102625761010080835404028352916020019161028d565b820191906000526020600020905b81548152906001019060200180831161027057829003601f168201915b505050505081526020016001820154815250508152602001600282016040518060400160405290816000820180546102c490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090611b1b565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050815260200160018201548152505081526020016004820160405180604001604052908160008201805461037490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546103a090611b1b565b80156103ed5780601f106103c2576101008083540402835291602001916103ed565b820191906000526020600020905b8154815290600101906020018083116103d057829003601f168201915b5050505050815260200160018201548152505081526020016006820160405180604001604052908160008201805461042490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461045090611b1b565b801561049d5780601f106104725761010080835404028352916020019161049d565b820191906000526020600020905b81548152906001019060200180831161048057829003601f168201915b505050505081526020016001820154815250508152602001600882016040518060400160405290816000820180546104d490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461050090611b1b565b801561054d5780601f106105225761010080835404028352916020019161054d565b820191906000526020600020905b81548152906001019060200180831161053057829003601f168201915b5050505050815260200160018201548152505081525050915050949350505050565b61057882610e23565b600061058383610e9a565b600181015490915073ffffffffffffffffffffffffffffffffffffffff838116911614610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f7200000000000000000000000000000060448201526064015b60405180910390fd5b505050565b61061f81610ed5565b156106ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610608565b50565b600061079f8360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060080154600014806107ca5750806007015481600601546107c39190611b9d565b8160080154145b610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610608565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155610894600a8201600061119d565b6108a2600b8201600061119d565b6108b06009820160006111bb565b60005b826020015151811015610bc75781600a01836020015182815181106108da576108da611bb0565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b840191908390811061095957610959611bb0565b60209081029190910181015181015182546001810184556000938452928290209092019190915583015180516009840191908390811061099b5761099b611bb0565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a9182021916908360028111156109eb576109eb611877565b021790555082602001518181518110610a0657610a06611bb0565b60200260200101516060015182600001600085602001518481518110610a2e57610a2e611bb0565b6020026020010151604001516002811115610a4b57610a4b611877565b6002811115610a5c57610a5c611877565b8152602001908152602001600020600085602001518481518110610a8257610a82611bb0565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110610ae057610ae0611bb0565b60209081029190910181015181015182528101919091526040016000208151805182908190610b0f9082611c2d565b50602091820151600190910155820151805160028301908190610b329082611c2d565b50602091909101516001909101556040820151805160048301908190610b589082611c2d565b50602091909101516001909101556060820151805160068301908190610b7e9082611c2d565b50602091909101516001909101556080820151805160088301908190610ba49082611c2d565b506020820151816001015550509050508080610bbf90611d47565b9150506108b3565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b610c00611126565b6000610c558360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050610c5f611126565b6040805160a081018252600184015481526002840154602080830191909152600385015482840152600485015460608084019190915260058601546080840152918452600885015491840191909152600684015483820152600784015483830152600c84015460ff16151560e0840152600a840180548351818402810184019094528084529091830182828015610d2c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d01575b5050505050816080018190525081600b01805480602002602001604051908101604052809291908181526020018280548015610d8757602002820191906000526020600020905b815481526020019060010190808311610d73575b50505050508160a0018190525081600901805480602002602001604051908101604052809291908181526020018280548015610e1257602002820191906000526020600020906000905b82829054906101000a900460ff166002811115610df057610df0611877565b815260206001928301818104948501949093039092029101808411610dd15790505b505050505060c08201529392505050565b610e2b610f64565b610e3481610ff7565b610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303610f39575060009392505050565b6003810154610f489042611b9d565b826003015410610f59576000610f5c565b60015b949350505050565b6000610f6e611053565b600481015490915074010000000000000000000000000000000000000000900460ff16610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff161561104a5750600192915050565b50600092915050565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261012b565b6040805160e08101909152606060a08201908152600060c0830152819081526020016110bb604051806040016040528060608152602001600081525090565b81526020016110dd604051806040016040528060608152602001600081525090565b81526020016110ff604051806040016040528060608152602001600081525090565b8152602001611121604051806040016040528060608152602001600081525090565b905290565b6040518061010001604052806111646040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b508054600082559060005260206000209081019061074791906111dc565b50805460008255601f01602090049060005260206000209081019061074791905b5b808211156111f157600081556001016111dd565b5090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461121957600080fd5b919050565b80356003811061121957600080fd5b6000806000806080858703121561124357600080fd5b84359350611253602086016111f5565b9250604085013591506112686060860161121e565b905092959194509250565b6000815160408452805180604086015260005b818110156112a35760208184018101516060888401015201611286565b506000606082870101526020840151602086015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b6000815160a0845261130160a0850182611273565b90506020830151848203602086015261131a8282611273565b915050604083015184820360408601526113348282611273565b9150506060830151848203606086015261134e8282611273565b915050608083015184820360808601526100b88282611273565b602081526000610ece60208301846112ec565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405290565b6040516080810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405160a0810167ffffffffffffffff811182821017156113cd576113cd61137b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114605761146061137b565b604052919050565b60006040828403121561147a57600080fd5b6114826113aa565b9050813567ffffffffffffffff8082111561149c57600080fd5b818401915084601f8301126114b057600080fd5b81356020828211156114c4576114c461137b565b6114f4817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601611419565b9250818352868183860101111561150a57600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600082601f83011261154057600080fd5b8135602067ffffffffffffffff8083111561155d5761155d61137b565b8260051b61156c838201611419565b938452858101830193838101908886111561158657600080fd5b84880192505b85831015611708578235848111156115a357600080fd5b88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06080828c03820112156115d857600080fd5b6115e06113d3565b6115eb8884016111f5565b8152604083013588820152606061160381850161121e565b604083015260808401358881111561161a57600080fd5b939093019260a0848e038401121561163157600080fd5b6116396113f6565b9250888401358881111561164c57600080fd5b61165a8e8b83880101611468565b84525060408401358881111561166f57600080fd5b61167d8e8b83880101611468565b8a85015250808401358881111561169357600080fd5b6116a18e8b83880101611468565b6040850152506080840135888111156116b957600080fd5b6116c78e8b83880101611468565b828501525060a0840135888111156116de57600080fd5b6116ec8e8b83880101611468565b608085015250810191909152835250918401919084019061158c565b98975050505050505050565b6000806040838503121561172757600080fd5b82359150602083013567ffffffffffffffff8082111561174657600080fd5b9084019081860360c081121561175b57600080fd5b6117636113aa565b60a082121561177157600080fd5b6117796113f6565b9150833582526020840135602083015260408401356040830152606084013560608301526080840135608083015281815260a08401359150828211156117be57600080fd5b6117ca8883860161152f565b6020820152809450505050509250929050565b6000602082840312156117ef57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561183c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161180a565b509495945050505050565b600081518084526020808501945080840160005b8381101561183c5781518752958201959082019060010161185b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106118dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600081518084526020808501945080840160005b8381101561183c576119088783516118a6565b95820195908201906001016118f5565b6020815261195560208201835180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b602082015160c0820152604082015160e0820152606082015161010082015260006080830151610180806101208501526119936101a08501836117f6565b915060a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868503016101408701526119d08483611847565b935060c087015191508086850301610160870152506119ef83826118e1565b92505060e0850151611a048286018215159052565b5090949350505050565b6000602080835260e08301611a51828501865180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b8185015160c085810152805191829052610100600583901b8601810192918401919086019060005b81811015611b0e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008886030183528351608073ffffffffffffffffffffffffffffffffffffffff82511687528782015188880152604080830151611ae0828a01826118a6565b5050606091820151918701819052611afa878201836112ec565b965050509285019291850191600101611a79565b5092979650505050505050565b600181811c90821680611b2f57607f821691505b602082108103611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561012b5761012b611b6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561061157600081815260208120601f850160051c81016020861015611c065750805b601f850160051c820191505b81811015611c2557828155600101611c12565b505050505050565b815167ffffffffffffffff811115611c4757611c4761137b565b611c5b81611c558454611b1b565b84611bdf565b602080601f831160018114611cae5760008415611c785750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611c25565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611cfb57888601518255948401946001909101908401611cdc565b5085821015611d3757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d7857611d78611b6e565b506001019056fea2646970667358221220d329d0d1a2ffe5f72026582995f467815b2435a51fe7f9931eb525c59cd0bb7564736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80638f298b2a14610046578063bbb294f81461006f578063bf0f2d7e14610084575b600080fd5b61005961005436600461122d565b6100a4565b6040516100669190611368565b60405180910390f35b61008261007d366004611714565b6100c1565b005b6100976100923660046117dd565b61011a565b6040516100669190611918565b6100ac61107c565b6100b885858585610131565b95945050505050565b6100cb823361056f565b6100d482610616565b6100de828261074a565b817fcf4865028c280be4f5db8efbf51379eace06ea78a59dad8020a2ac3593b33fbb8260405161010e9190611a0e565b60405180910390a25050565b610122611126565b61012b82610bf8565b92915050565b61013961107c565b600061018e8660408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060008460028111156101a5576101a5611877565b60028111156101b6576101b6611877565b81526020808201929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff89168252835281812087825290925290819020815160e081019092528054829060a082019083908290829061021490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461024090611b1b565b801561028d5780601f106102625761010080835404028352916020019161028d565b820191906000526020600020905b81548152906001019060200180831161027057829003601f168201915b505050505081526020016001820154815250508152602001600282016040518060400160405290816000820180546102c490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546102f090611b1b565b801561033d5780601f106103125761010080835404028352916020019161033d565b820191906000526020600020905b81548152906001019060200180831161032057829003601f168201915b5050505050815260200160018201548152505081526020016004820160405180604001604052908160008201805461037490611b1b565b80601f01602080910402602001604051908101604052809291908181526020018280546103a090611b1b565b80156103ed5780601f106103c2576101008083540402835291602001916103ed565b820191906000526020600020905b8154815290600101906020018083116103d057829003601f168201915b5050505050815260200160018201548152505081526020016006820160405180604001604052908160008201805461042490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461045090611b1b565b801561049d5780601f106104725761010080835404028352916020019161049d565b820191906000526020600020905b81548152906001019060200180831161048057829003601f168201915b505050505081526020016001820154815250508152602001600882016040518060400160405290816000820180546104d490611b1b565b80601f016020809104026020016040519081016040528092919081815260200182805461050090611b1b565b801561054d5780601f106105225761010080835404028352916020019161054d565b820191906000526020600020905b81548152906001019060200180831161053057829003601f168201915b5050505050815260200160018201548152505081525050915050949350505050565b61057882610e23565b600061058383610e9a565b600181015490915073ffffffffffffffffffffffffffffffffffffffff838116911614610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4f6e6c792067616d652063726561746f7200000000000000000000000000000060448201526064015b60405180910390fd5b505050565b61061f81610ed5565b156106ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f7420646f207768656e20726567697374726174696f6e206973206f60448201527f70656e00000000000000000000000000000000000000000000000000000000006064820152608401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f35602052604090206004015460ff1615610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e6e6f7420646f207768656e2067616d65207374617274656400000000006044820152606401610608565b50565b600061079f8360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b90508060080154600014806107ca5750806007015481600601546107c39190611b9d565b8160080154145b610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f43616e6e6f74206d757461746520706f736974696f6e2077697468206375727260448201527f656e746c7920706f7369746976652062616c616e6365000000000000000000006064820152608401610608565b815180516001830155602081015160028301556040810151600383015560608101516004830155608001516005820155610894600a8201600061119d565b6108a2600b8201600061119d565b6108b06009820160006111bb565b60005b826020015151811015610bc75781600a01836020015182815181106108da576108da611bb0565b60209081029190910181015151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558301518051600b840191908390811061095957610959611bb0565b60209081029190910181015181015182546001810184556000938452928290209092019190915583015180516009840191908390811061099b5761099b611bb0565b60209081029190910181015160400151825460018101845560009384529282902091830490910180549192909160ff601f9092166101000a9182021916908360028111156109eb576109eb611877565b021790555082602001518181518110610a0657610a06611bb0565b60200260200101516060015182600001600085602001518481518110610a2e57610a2e611bb0565b6020026020010151604001516002811115610a4b57610a4b611877565b6002811115610a5c57610a5c611877565b8152602001908152602001600020600085602001518481518110610a8257610a82611bb0565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085602001518481518110610ae057610ae0611bb0565b60209081029190910181015181015182528101919091526040016000208151805182908190610b0f9082611c2d565b50602091820151600190910155820151805160028301908190610b329082611c2d565b50602091909101516001909101556040820151805160048301908190610b589082611c2d565b50602091909101516001909101556060820151805160068301908190610b7e9082611c2d565b50602091909101516001909101556080820151805160088301908190610ba49082611c2d565b506020820151816001015550509050508080610bbf90611d47565b9150506108b3565b50600c0180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b610c00611126565b6000610c558360408051602080820193909352815180820384018152908201825280519083012060009081527fb12a0409539e5fa777ebbd0648c2d35d1b56f5385885518278a66364324a9138909252902090565b9050610c5f611126565b6040805160a081018252600184015481526002840154602080830191909152600385015482840152600485015460608084019190915260058601546080840152918452600885015491840191909152600684015483820152600784015483830152600c84015460ff16151560e0840152600a840180548351818402810184019094528084529091830182828015610d2c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d01575b5050505050816080018190525081600b01805480602002602001604051908101604052809291908181526020018280548015610d8757602002820191906000526020600020905b815481526020019060010190808311610d73575b50505050508160a0018190525081600901805480602002602001604051908101604052809291908181526020018280548015610e1257602002820191906000526020600020906000905b82829054906101000a900460ff166002811115610df057610df0611877565b815260206001928301818104948501949093039092029101808411610dd15790505b505050505060c08201529392505050565b610e2b610f64565b610e3481610ff7565b610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f2067616d6520666f756e64000000000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120600a015481905b9392505050565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f356020526040812060038101547f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f2d908303610f39575060009392505050565b6003810154610f489042611b9d565b826003015410610f59576000610f5c565b60015b949350505050565b6000610f6e611053565b600481015490915074010000000000000000000000000000000000000000900460ff16610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f6e6c79496e697469616c697a656400000000000000000000000000000000006044820152606401610608565b60008181527f91591bea3fc8863c74b4740fa2dfd9fd428a1e509b60555e4d1e8d8028901f3560205260408120805473ffffffffffffffffffffffffffffffffffffffff161561104a5750600192915050565b50600092915050565b6000807f7acf15cdb85906c3736403f86bf7ccb69a25bb6dbdcde1cbcbf35fe2a64df85261012b565b6040805160e08101909152606060a08201908152600060c0830152819081526020016110bb604051806040016040528060608152602001600081525090565b81526020016110dd604051806040016040528060608152602001600081525090565b81526020016110ff604051806040016040528060608152602001600081525090565b8152602001611121604051806040016040528060608152602001600081525090565b905290565b6040518061010001604052806111646040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020016000815260200160008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b508054600082559060005260206000209081019061074791906111dc565b50805460008255601f01602090049060005260206000209081019061074791905b5b808211156111f157600081556001016111dd565b5090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461121957600080fd5b919050565b80356003811061121957600080fd5b6000806000806080858703121561124357600080fd5b84359350611253602086016111f5565b9250604085013591506112686060860161121e565b905092959194509250565b6000815160408452805180604086015260005b818110156112a35760208184018101516060888401015201611286565b506000606082870101526020840151602086015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b6000815160a0845261130160a0850182611273565b90506020830151848203602086015261131a8282611273565b915050604083015184820360408601526113348282611273565b9150506060830151848203606086015261134e8282611273565b915050608083015184820360808601526100b88282611273565b602081526000610ece60208301846112ec565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405290565b6040516080810167ffffffffffffffff811182821017156113cd576113cd61137b565b60405160a0810167ffffffffffffffff811182821017156113cd576113cd61137b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114605761146061137b565b604052919050565b60006040828403121561147a57600080fd5b6114826113aa565b9050813567ffffffffffffffff8082111561149c57600080fd5b818401915084601f8301126114b057600080fd5b81356020828211156114c4576114c461137b565b6114f4817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601611419565b9250818352868183860101111561150a57600080fd5b8181850182850137600081838501015282855280860135818601525050505092915050565b600082601f83011261154057600080fd5b8135602067ffffffffffffffff8083111561155d5761155d61137b565b8260051b61156c838201611419565b938452858101830193838101908886111561158657600080fd5b84880192505b85831015611708578235848111156115a357600080fd5b88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06080828c03820112156115d857600080fd5b6115e06113d3565b6115eb8884016111f5565b8152604083013588820152606061160381850161121e565b604083015260808401358881111561161a57600080fd5b939093019260a0848e038401121561163157600080fd5b6116396113f6565b9250888401358881111561164c57600080fd5b61165a8e8b83880101611468565b84525060408401358881111561166f57600080fd5b61167d8e8b83880101611468565b8a85015250808401358881111561169357600080fd5b6116a18e8b83880101611468565b6040850152506080840135888111156116b957600080fd5b6116c78e8b83880101611468565b828501525060a0840135888111156116de57600080fd5b6116ec8e8b83880101611468565b608085015250810191909152835250918401919084019061158c565b98975050505050505050565b6000806040838503121561172757600080fd5b82359150602083013567ffffffffffffffff8082111561174657600080fd5b9084019081860360c081121561175b57600080fd5b6117636113aa565b60a082121561177157600080fd5b6117796113f6565b9150833582526020840135602083015260408401356040830152606084013560608301526080840135608083015281815260a08401359150828211156117be57600080fd5b6117ca8883860161152f565b6020820152809450505050509250929050565b6000602082840312156117ef57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561183c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161180a565b509495945050505050565b600081518084526020808501945080840160005b8381101561183c5781518752958201959082019060010161185b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106118dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600081518084526020808501945080840160005b8381101561183c576119088783516118a6565b95820195908201906001016118f5565b6020815261195560208201835180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b602082015160c0820152604082015160e0820152606082015161010082015260006080830151610180806101208501526119936101a08501836117f6565b915060a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868503016101408701526119d08483611847565b935060c087015191508086850301610160870152506119ef83826118e1565b92505060e0850151611a048286018215159052565b5090949350505050565b6000602080835260e08301611a51828501865180518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b8185015160c085810152805191829052610100600583901b8601810192918401919086019060005b81811015611b0e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008886030183528351608073ffffffffffffffffffffffffffffffffffffffff82511687528782015188880152604080830151611ae0828a01826118a6565b5050606091820151918701819052611afa878201836112ec565b965050509285019291850191600101611a79565b5092979650505050505050565b600181811c90821680611b2f57607f821691505b602082108103611b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561012b5761012b611b6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561061157600081815260208120601f850160051c81016020861015611c065750805b601f850160051c820191505b81811015611c2557828155600101611c12565b505050505050565b815167ffffffffffffffff811115611c4757611c4761137b565b611c5b81611c558454611b1b565b84611bdf565b602080601f831160018114611cae5760008415611c785750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611c25565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611cfb57888601518255948401946001909101908401611cdc565b5085821015611d3757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d7857611d78611b6e565b506001019056fea2646970667358221220d329d0d1a2ffe5f72026582995f467815b2435a51fe7f9931eb525c59cd0bb7564736f6c63430008140033", "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/anvil/RankifyInstance_DiamondProxy.json b/deployments/anvil/RankifyInstance_DiamondProxy.json index 559fec7..7b191a0 100644 --- a/deployments/anvil/RankifyInstance_DiamondProxy.json +++ b/deployments/anvil/RankifyInstance_DiamondProxy.json @@ -1,5 +1,5 @@ { - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "abi": [ { "inputs": [ @@ -2082,22 +2082,22 @@ "type": "function" } ], - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", "receipt": { "to": null, "from": "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", - "contractAddress": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "contractAddress": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "transactionIndex": 0, - "gasUsed": "4314562", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000000000020000000000000000000000000020000000000000000000000000000000000001000", - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331", - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", + "gasUsed": "4314556", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000100000010000000000000000000001000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000", + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c", + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", "logs": [ { "transactionIndex": 0, - "blockNumber": 350, - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "blockNumber": 494, + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -2105,23 +2105,23 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331" + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c" }, { "transactionIndex": 0, - "blockNumber": 350, - "transactionHash": "0x703f6959eaef6963a4000de6963c3b9e556cfbbbe831ad9d38c4beb9aa3ae243", - "address": "0x21172Fb6cf3d87F4e0E8d53540b5402303973CBb", + "blockNumber": 494, + "transactionHash": "0x8ec39226d98155497bd7c33741864e7532204638dfe4ea832045f28297b45b8c", + "address": "0xdc18a102c635f5c61EA4021da2d42259dD0861Ae", "topics": [ "0x8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673" ], - "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ac0000000000000000000000000cb5c55b0dee9e0d6198199f12a7998878428af3900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001958759df700000000000000000000000000000000000000000000000000000000392b749c0000000000000000000000000000000000000000000000000000000069958ab90000000000000000000000000000000000000000000000000000000007ead930000000000000000000000000000000000000000000000000000000003b17469e00000000000000000000000000000000000000000000000000000000e240ae5f00000000000000000000000000000000000000000000000000000000aee5f34a000000000000000000000000000000000000000000000000000000007f4e484900000000000000000000000000000000000000000000000000000000f72ea467000000000000000000000000000000000000000000000000000000009a214b1e00000000000000000000000000000000000000000000000000000000460e204900000000000000000000000000000000000000000000000000000000bfa640360000000000000000000000000000000000000000000000000000000004527d9000000000000000000000000000000000000000000000000000000000b55991c0000000000000000000000000000000000000000000000000000000008eed01f800000000000000000000000000000000000000000000000000000000b881cffe000000000000000000000000000000000000000000000000000000009637460e000000000000000000000000000000000000000000000000000000004024ba7500000000000000000000000000000000000000000000000000000000efaa55a0000000000000000000000000000000000000000000000000000000003feef58a00000000000000000000000000000000000000000000000000000000bc197c8100000000000000000000000000000000000000000000000000000000f23a6e6100000000000000000000000000000000000000000000000000000000150b7a0200000000000000000000000000000000000000000000000000000000cca84a0c00000000000000000000000000000000000000000000000000000000e5ed1d5900000000000000000000000000000000000000000000000000000000000000000000000000000000173d20bee670466887b24aa7922b390850ff7abb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030c6446d500000000000000000000000000000000000000000000000000000000463bc355000000000000000000000000000000000000000000000000000000006a9947350000000000000000000000000000000000000000000000000000000000000000000000000000000038099cf572177fa663fa965ecef555337186fedc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003bf0f2d7e000000000000000000000000000000000000000000000000000000008f298b2a00000000000000000000000000000000000000000000000000000000bbb294f800000000000000000000000000000000000000000000000000000000000000000000000000000000941d54f8dbfe25d1caeb440b72c489aac4bb04500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000026cbadbfa00000000000000000000000000000000000000000000000000000000d3a8018d00000000000000000000000000000000000000000000000000000000000000000000000000000000e7edc83fefaca5f057dd1e7477bf07496d1a86eb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011e77abbc00000000000000000000000000000000000000000000000000000000000000000000000000000000a8ce553e9dc807db4cac12f43d50d19200d9ec8400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000826126d460000000000000000000000000000000000000000000000000000000059db5bf7000000000000000000000000000000000000000000000000000000008651734100000000000000000000000000000000000000000000000000000000966fb1ea00000000000000000000000000000000000000000000000000000000924b5bb100000000000000000000000000000000000000000000000000000000869dc02100000000000000000000000000000000000000000000000000000000c94b01da00000000000000000000000000000000000000000000000000000000911f8e1b00000000000000000000000000000000000000000000000000000000000000000000000000000000429dbde7913c0ed51e4b21163760b92ee66ff5f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad6e96ff641af53cce4205dafecb8e3acd0490e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000003bcf4185443a339517ad4e580067f178d1b68e1d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ac0000000000000000000000000e0744e372a685ae1c1a4ec3c5e56524b03582c9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001958759df700000000000000000000000000000000000000000000000000000000392b749c0000000000000000000000000000000000000000000000000000000069958ab90000000000000000000000000000000000000000000000000000000007ead930000000000000000000000000000000000000000000000000000000003b17469e00000000000000000000000000000000000000000000000000000000e240ae5f00000000000000000000000000000000000000000000000000000000aee5f34a000000000000000000000000000000000000000000000000000000007f4e484900000000000000000000000000000000000000000000000000000000f72ea467000000000000000000000000000000000000000000000000000000009a214b1e00000000000000000000000000000000000000000000000000000000460e204900000000000000000000000000000000000000000000000000000000bfa640360000000000000000000000000000000000000000000000000000000004527d9000000000000000000000000000000000000000000000000000000000b55991c0000000000000000000000000000000000000000000000000000000008eed01f800000000000000000000000000000000000000000000000000000000b881cffe000000000000000000000000000000000000000000000000000000009637460e000000000000000000000000000000000000000000000000000000004024ba7500000000000000000000000000000000000000000000000000000000efaa55a0000000000000000000000000000000000000000000000000000000003feef58a00000000000000000000000000000000000000000000000000000000bc197c8100000000000000000000000000000000000000000000000000000000f23a6e6100000000000000000000000000000000000000000000000000000000150b7a0200000000000000000000000000000000000000000000000000000000cca84a0c00000000000000000000000000000000000000000000000000000000e5ed1d59000000000000000000000000000000000000000000000000000000000000000000000000000000002e24f0528ffdb09adcbd6ac8b3321fcc8198c1820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030c6446d500000000000000000000000000000000000000000000000000000000463bc355000000000000000000000000000000000000000000000000000000006a99473500000000000000000000000000000000000000000000000000000000000000000000000000000000837e298d2472337ad89d666eafb6c272728fd43b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003bf0f2d7e000000000000000000000000000000000000000000000000000000008f298b2a00000000000000000000000000000000000000000000000000000000bbb294f800000000000000000000000000000000000000000000000000000000000000000000000000000000941d54f8dbfe25d1caeb440b72c489aac4bb04500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000026cbadbfa00000000000000000000000000000000000000000000000000000000d3a8018d0000000000000000000000000000000000000000000000000000000000000000000000000000000037c1d4d9762ddc02ae1df9cb1401ae40a19b532c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011e77abbc00000000000000000000000000000000000000000000000000000000000000000000000000000000d10b43a07ad4eecfdd0018ea6cabeb69f8d0ef4c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000826126d460000000000000000000000000000000000000000000000000000000059db5bf7000000000000000000000000000000000000000000000000000000008651734100000000000000000000000000000000000000000000000000000000966fb1ea00000000000000000000000000000000000000000000000000000000924b5bb100000000000000000000000000000000000000000000000000000000869dc02100000000000000000000000000000000000000000000000000000000c94b01da00000000000000000000000000000000000000000000000000000000911f8e1b00000000000000000000000000000000000000000000000000000000000000000000000000000000429dbde7913c0ed51e4b21163760b92ee66ff5f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad6e96ff641af53cce4205dafecb8e3acd0490e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000003bcf4185443a339517ad4e580067f178d1b68e1d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logIndex": 1, - "blockHash": "0x2173d97073ae34c5712ab9b9d17ae7c8d4afb48a395bcbd6c9fdce09e933a331" + "blockHash": "0x07c284804ff4070665253913df35535188d612837b918ba51edae5716fa60d5c" } ], - "blockNumber": 350, - "cumulativeGasUsed": "4314562", + "blockNumber": 494, + "cumulativeGasUsed": "4314556", "status": 1, "byzantium": true }, @@ -2129,7 +2129,7 @@ "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583", [ { - "facetAddress": "0xCB5c55B0DeE9e0d6198199F12A7998878428AF39", + "facetAddress": "0xE0744E372a685aE1c1a4ec3C5E56524b03582c9B", "functionSelectors": [ "0x58759df7", "0x392b749c", @@ -2160,7 +2160,7 @@ "action": 0 }, { - "facetAddress": "0x173D20Bee670466887B24AA7922b390850FF7abB", + "facetAddress": "0x2E24f0528Ffdb09ADCbd6AC8b3321fCC8198C182", "functionSelectors": [ "0x0c6446d5", "0x463bc355", @@ -2169,7 +2169,7 @@ "action": 0 }, { - "facetAddress": "0x38099cf572177fa663fa965eCef555337186fEdc", + "facetAddress": "0x837e298D2472337ad89d666eAFb6c272728fd43b", "functionSelectors": [ "0xbf0f2d7e", "0x8f298b2a", @@ -2186,14 +2186,14 @@ "action": 0 }, { - "facetAddress": "0xE7edC83fefacA5F057DD1E7477Bf07496d1A86eB", + "facetAddress": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", "functionSelectors": [ "0x1e77abbc" ], "action": 0 }, { - "facetAddress": "0xa8CE553e9dc807dB4caC12F43D50D19200d9ec84", + "facetAddress": "0xD10B43A07ad4EEcfDd0018eA6CaBeB69F8d0eF4C", "functionSelectors": [ "0x26126d46", "0x59db5bf7", @@ -2239,8 +2239,8 @@ "initData": "0x2a84809100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000148e2b093000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, { - "initContract": "0xE7edC83fefacA5F057DD1E7477Bf07496d1A86eB", - "initData": "0x1e77abbc000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000e52616e6b6679496e7374616e63650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005302e302e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000231e0b68978ca2015a8c3cae7aa3ca34dc1700bc0000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000018000000000000000000000000021c68aa0be617ebe09138d185bf2ff804131a8da000000000000000000000000000000000000000000000000000000000000000d4265737420506c61796c69737400000000000000000000000000000000000000" + "initContract": "0x37C1d4d9762ddc02aE1Df9cB1401AE40a19b532C", + "initData": "0x1e77abbc000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000e52616e6b6679496e7374616e63650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005302e302e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093a8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000005000000000000000000000000bbda1841822cc43954fa455ab1cb9de5f927089400000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000018000000000000000000000000021c68aa0be617ebe09138d185bf2ff804131a8da000000000000000000000000000000000000000000000000000000000000000f4d75736963204368616c6c656e67650000000000000000000000000000000000" } ] ], diff --git a/deployments/anvil/solcInputs/950621027b9d5cffdabde867c6602559.json b/deployments/anvil/solcInputs/950621027b9d5cffdabde867c6602559.json new file mode 100644 index 0000000..7dbbc9b --- /dev/null +++ b/deployments/anvil/solcInputs/950621027b9d5cffdabde867c6602559.json @@ -0,0 +1,210 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155.sol\";\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20.sol\";\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"./extensions/IERC1155MetadataURI.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping(uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /**\n * @dev See {_setURI}.\n */\n constructor(string memory uri_) {\n _setURI(uri_);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC1155).interfaceId ||\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) public view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: address zero is not a valid owner\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n ) public view virtual override returns (uint256[] memory) {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n _safeTransferFrom(from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n _safeBatchTransferFrom(from, to, ids, amounts, data);\n }\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] += amounts[i];\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `from`\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `from` must have at least `amount` tokens of token type `id`.\n */\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n\n emit TransferSingle(operator, from, address(0), id, amount);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n for (uint256 i = 0; i < ids.length; i++) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n }\n\n emit TransferBatch(operator, from, address(0), ids, amounts);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n require(owner != operator, \"ERC1155: setting approval status for self\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver.onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non-ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n bytes4 response\n ) {\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non-ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\n\n/**\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\n * own tokens and those that they have been approved to use.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155Burnable is ERC1155 {\n function burn(address account, uint256 id, uint256 value) public virtual {\n require(\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n\n _burn(account, id, value);\n }\n\n function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {\n require(\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n\n _burnBatch(account, ids, values);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value The amount of tokens being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n _spendAllowance(account, _msgSender(), amount);\n _burn(account, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _ownerOf(tokenId) != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n *\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\n * that `ownerOf(tokenId)` is `a`.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\n _balances[account] += amount;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be burned (destroyed).\n */\nabstract contract ERC721Burnable is Context, ERC721 {\n /**\n * @dev Burns `tokenId`. See {ERC721-_burn}.\n *\n * Requirements:\n *\n * - The caller must own `tokenId` or be an approved operator.\n */\n function burn(uint256 tokenId) public virtual {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "hardhat/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS =\n 0x000000000000000000636F6e736F6c652e6c6f67;\n\n function _sendLogPayloadImplementation(bytes memory payload) internal view {\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n pop(\n staticcall(\n gas(),\n consoleAddress,\n add(payload, 32),\n mload(payload),\n 0,\n 0\n )\n )\n }\n }\n\n function _castToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castToPure(_sendLogPayloadImplementation)(payload);\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}\n" + }, + "src/abstracts/CompositeERC1155.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.20;\nimport \"../libraries/LibReentrancyGuard.sol\";\nimport \"./LockableERC1155.sol\";\n\n/**\n * @title CompositeERC1155\n * @dev An abstract contract that extends LockableERC1155 and provides functionality for composite ERC1155 tokens.\n * Composite tokens can be \"composed\" from multiple underlying assets, which however do not change their owner\n * and in contrast to that use LockableERC1155 standard, which allows to read locked asset BalanceOf, OwnerOf methods correctly\n */\nabstract contract CompositeERC1155 is LockableERC1155 {\n address[] private dimensions;\n uint256[] private weights;\n\n constructor(string memory uri_, address[] memory dimensionTokens, uint256[] memory tokenWeights) ERC1155(uri_) {\n require(dimensionTokens.length == tokenWeights.length, \"Array lengths must be equal\");\n dimensions = dimensionTokens;\n weights = tokenWeights;\n }\n\n function _mint(address to, uint256 tokenId, uint256 value, bytes memory data) internal virtual override {\n for (uint256 i = 0; i < dimensions.length; i++) {\n LockableERC1155(dimensions[i]).lock(to, tokenId, value * weights[i]);\n }\n super._mint(to, tokenId, value, data);\n }\n\n function _burn(address from, uint256 id, uint256 amount) internal override {\n for (uint256 i = 0; i < dimensions.length; i++) {\n CompositeERC1155(dimensions[i]).burn(from, id, amount * weights[i]);\n }\n super._burn(from, id, amount);\n }\n\n /**\n * @dev Decomposes a composite ERC1155 token into its individual components.\n * This function unlocks the specified amount of the composite token from each dimension,\n * and then burns the specified amount of the composite token from the caller's balance.\n * @param from The address from which the composite token is being decomposed.\n * @param id The ID of the composite token being decomposed.\n * @param amount The amount of the composite token to decompose.\n */\n function decompose(address from, uint256 id, uint256 amount) public virtual {\n for (uint256 i = 0; i < dimensions.length; i++) {\n LockableERC1155(dimensions[i]).unlock(from, id, amount * weights[i]);\n }\n _burn(from, id, amount);\n }\n\n /**\n * @dev Burns a specified amount of tokens from the given account.\n * This will burn all underlying (composite) assets\n *\n * Requirements:\n * - `account` must be the token owner or an approved operator.\n * - `id` and `value` must be valid token ID and amount to burn.\n * - All underlying \"composite\" assets implement burn as well\n *\n * @param account The address of the token owner.\n * @param id The ID of the token to burn.\n * @param value The amount of tokens to burn.\n */\n function burn(address account, uint256 id, uint256 value) public virtual {\n require(\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n\n _burn(account, id, value);\n }\n\n /**\n * @dev Retrieves the components of the CompositeERC1155 contract.\n * @return An array of component addresses and an array of component weights.\n */\n function getComponents() public virtual returns (address[] memory, uint256[] memory) {\n return (dimensions, weights);\n }\n}\n" + }, + "src/abstracts/DiamondReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Author: @Peersky https://github.com/peersky\n * Adapted this diamond reentrancy guard from:\n\n * Authors: Moonstream Engineering (engineering@moonstream.to)\n * GitHub: https://github.com/bugout-dev/dao\n */\n\npragma solidity ^0.8.20;\nimport \"../libraries/LibReentrancyGuard.sol\";\n\nabstract contract DiamondReentrancyGuard {\n modifier nonReentrant() {\n LibReentrancyGuard.ReentrancyGuardStruct storage rgs = LibReentrancyGuard.reentrancyGuardStorage();\n require(!rgs._entered, \"REG: You shall not pass!\");\n rgs._entered = true;\n _;\n rgs._entered = false;\n }\n}\n" + }, + "src/abstracts/draft-EIP712Diamond.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../libraries/LibEIP712Storage.sol\";\nimport \"../modifiers/OnlyOwnerDiamond.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 is OnlyOwnerDiamond {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor() {}\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\n if (address(this) == ss._CACHED_THIS && block.chainid == ss._CACHED_CHAIN_ID) {\n return ss._CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(ss._TYPE_HASH, ss._HASHED_NAME, ss._HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "src/abstracts/LockableERC1155.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.20;\nimport \"../libraries/LibReentrancyGuard.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport {ILockableERC1155} from \"../interfaces/ILockableERC1155.sol\";\nerror insufficient(uint256 id, uint256 balance, uint256 required);\n\n/**\n * @title LockableERC1155\n * @dev This is an abstract contract that extends the ERC1155 token contract and implements the ILockableERC1155 interface.\n * It provides functionality to lock and unlock token amounts for specific accounts and IDs.\n */\nabstract contract LockableERC1155 is ERC1155, ILockableERC1155 {\n mapping(address => mapping(uint256 => uint256)) lockedAmounts;\n\n /**\n * @dev Locks a specified amount of tokens for a given account and token ID.\n * If the account does not have enough balance to lock the specified amount,\n * the function will revert with an \"insufficient\" error message.\n * Emits a `TokensLocked` event after successfully locking the tokens.\n * @param account The address of the account to lock tokens for.\n * @param id The ID of the token to lock.\n * @param amount The amount of tokens to lock.\n */\n function lock(address account, uint256 id, uint256 amount) public virtual {\n if (balanceOf(account, id) < lockedAmounts[account][id] + amount) require(false, \"insufficient\");\n // revert insufficient(id, lockedAmounts[account][id], amount);\n lockedAmounts[account][id] += amount;\n emit TokensLocked(account, id, amount);\n }\n\n /**\n * @dev Unlocks a specified amount of tokens for a given account and token ID.\n * If the locked amount is less than the specified amount, it reverts with an \"insufficient\" error message.\n * Emits a `TokensUnlocked` event after unlocking the tokens.\n * @param account The address of the account to unlock tokens for.\n * @param id The ID of the token to unlock.\n * @param amount The amount of tokens to unlock.\n */\n function unlock(address account, uint256 id, uint256 amount) public virtual {\n if (lockedAmounts[account][id] < amount) require(false, \"insufficient\"); //revert insufficient(id, lockedAmounts[account][id], amount);\n lockedAmounts[account][id] -= amount;\n emit TokensUnlocked(account, id, amount);\n }\n\n /**\n * @dev Returns the unlocked balance of a specific ERC1155 token for an account.\n * The unlocked balance is calculated by subtracting the locked amount from the total balance.\n * @param account The address of the account.\n * @param id The ID of the ERC1155 token.\n * @return The unlocked balance of the ERC1155 token for the account.\n */\n function unlockedBalanceOf(address account, uint256 id) public view returns (uint256) {\n return balanceOf(account, id) - lockedAmounts[account][id];\n }\n\n /**\n * @dev Hook function that is called before any token transfer.\n * It checks if the transfer is allowed based on the locked amounts of the tokens.\n * If the transfer is not allowed, it reverts with an error message.\n * @param operator The address performing the token transfer.\n * @param from The address from which the tokens are being transferred.\n * @param to The address to which the tokens are being transferred.\n * @param ids An array of token IDs being transferred.\n * @param amounts An array of token amounts being transferred.\n * @param data Additional data attached to the transfer.\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual override {\n for (uint256 i = 0; i < ids.length; i++) {\n if (from != address(0)) {\n if (lockedAmounts[from][ids[i]] + amounts[i] > balanceOf(from, ids[i])) {\n require(false, \"insufficient\");\n }\n }\n }\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\n }\n}\n" + }, + "src/facets/RankifyInstanceGameMastersFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {LibArray} from \"../libraries/LibArray.sol\";\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {LibRankify} from \"../libraries/LibRankify.sol\";\nimport {IRankifyInstanceCommons} from \"../interfaces/IRankifyInstanceCommons.sol\";\nimport \"../abstracts/DiamondReentrancyGuard.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../abstracts/draft-EIP712Diamond.sol\";\nimport {RankToken} from \"../tokens/RankToken.sol\";\nimport {LibCoinVending} from \"../libraries/LibCoinVending.sol\";\nimport \"hardhat/console.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/interfaces/IERC20.sol\";\nimport \"../vendor/libraries/LibDiamond.sol\";\n\ncontract RankifyInstanceGameMastersFacet is DiamondReentrancyGuard, EIP712 {\n using LibTBG for uint256;\n using LibRankify for uint256;\n using LibTBG for LibTBG.GameInstance;\n event OverTime(uint256 indexed gameId);\n event LastTurn(uint256 indexed gameId);\n event ProposalScore(\n uint256 indexed gameId,\n uint256 indexed turn,\n string indexed proposalHash,\n string proposal,\n uint256 score\n );\n event TurnEnded(\n uint256 indexed gameId,\n uint256 indexed turn,\n address[] players,\n uint256[] scores,\n string[] newProposals,\n uint256[] proposerIndicies,\n uint256[][] votes\n );\n\n event GameOver(uint256 indexed gameId, address[] indexed players, uint256[] indexed scores);\n\n event ProposalSubmitted(\n uint256 indexed gameId,\n uint256 indexed turn,\n address indexed proposer,\n bytes32 commitmentHash,\n string proposalEncryptedByGM\n );\n struct ProposalParams {\n uint256 gameId;\n string encryptedProposal;\n bytes32 commitmentHash;\n address proposer;\n }\n\n event VoteSubmitted(uint256 indexed gameId, uint256 indexed turn, address indexed player, string votesHidden);\n\n /**\n * @dev Handles the end of the game for a player. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Modifies:\n *\n * - Releases the coins for the game with `gameId`, the game creator, the top player, and `player`.\n */\n function onPlayersGameEnd(uint256 gameId, address player) private {\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\n LibCoinVending.release(bytes32(gameId), game.createdBy, gameId.getLeaderBoard()[0], player);\n }\n\n /**\n * @dev Submits a vote for a game. `gameId` is the ID of the game. `encryptedVotes` is the encrypted votes. `voter` is the address of the voter.\n *\n * Emits a _VoteSubmitted_ event.\n *\n * Requirements:\n *\n * - The caller must be a game master of the game with `gameId`.\n * - The game with `gameId` must exist.\n * - The game with `gameId` must have started.\n * - The game with `gameId` must not be over.\n * - `voter` must be in the game with `gameId`.\n * - The current turn of the game with `gameId` must be greater than 1.\n */\n function submitVote(uint256 gameId, string memory encryptedVotes, address voter) public {\n LibRankify.enforceIsGM(gameId, msg.sender);\n gameId.enforceGameExists();\n gameId.enforceHasStarted();\n require(!gameId.isGameOver(), \"Game over\");\n gameId.enforceIsPlayingGame(voter);\n require(gameId.getTurn() > 1, \"No proposals exist at turn 1: cannot vote\");\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\n require(!game.playerVoted[voter], \"Already voted\");\n game.numVotesThisTurn += 1;\n game.playerVoted[voter] = true;\n gameId.tryPlayerMove(voter);\n emit VoteSubmitted(gameId, gameId.getTurn(), voter, encryptedVotes);\n }\n\n /**\n * @dev Submits a proposal for a game. `proposalData` is the proposal data.\n *\n * Requirements:\n *\n * - The game with `proposalData.gameId` must exist.\n * - The caller must be a game master of the game with `proposalData.gameId`.\n */\n function submitProposal(ProposalParams memory proposalData) public {\n proposalData.gameId.enforceGameExists();\n proposalData.gameId.enforceIsGM(msg.sender);\n require(!proposalData.gameId.isGameOver(), \"Game over\");\n proposalData.gameId.enforceHasStarted();\n\n IRankifyInstanceCommons.RInstance storage game = proposalData.gameId.getGameStorage();\n require(LibTBG.getPlayersGame(proposalData.proposer) == proposalData.gameId, \"not a player\");\n // require(!proposalData.gameId.isLastTurn(), \"Cannot propose in last turn\");\n require(bytes(proposalData.encryptedProposal).length != 0, \"Cannot propose empty\");\n require(game.proposalCommitmentHashes[proposalData.proposer] == \"\", \"Already proposed!\");\n uint256 turn = proposalData.gameId.getTurn();\n game.proposalCommitmentHashes[proposalData.proposer] = proposalData.commitmentHash;\n game.numCommitments += 1;\n proposalData.gameId.tryPlayerMove(proposalData.proposer);\n emit ProposalSubmitted(\n proposalData.gameId,\n turn,\n proposalData.proposer,\n proposalData.commitmentHash,\n proposalData.encryptedProposal\n );\n }\n\n /**\n * @dev Handles the actions after the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\n *\n * Modifies:\n *\n * - Sets the ongoing proposals of the game with `gameId` to `newProposals`.\n * - Increments the number of ongoing proposals of the game with `gameId` by the number of `newProposals`.\n */\n function _afterNextTurn(uint256 gameId, string[] memory newProposals) private {\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\n for (uint256 i = 0; i < newProposals.length; i++) {\n game.ongoingProposals[i] = newProposals[i];\n game.numOngoingProposals += 1;\n }\n }\n\n /**\n * @dev Handles the next turn of a game with the provided game ID. `gameId` is the ID of the game. `newProposals` is the array of new proposals.\n *\n * Emits an {OverTime_ event if the game is in the last turn and overtime.\n * emits a _LastTurn_ event if the game is in the last turn.\n * emits a _GameOver_ event if the game is over.\n *\n * Modifies:\n *\n * - Calls the `_afterNextTurn` function with `gameId` and `newProposals`.\n */\n function _nextTurn(uint256 gameId, string[] memory newProposals) private {\n (bool _isLastTurn, bool _isOvertime, bool _isGameOver) = gameId.nextTurn();\n if (_isLastTurn && _isOvertime) {\n emit OverTime(gameId);\n }\n if (_isLastTurn) {\n emit LastTurn(gameId);\n }\n if (_isGameOver) {\n uint256[] memory finalScores = gameId.closeGame(LibDiamond.contractOwner(), onPlayersGameEnd);\n address[] memory players = gameId.getPlayers();\n emit GameOver(gameId, players, finalScores);\n }\n _afterNextTurn(gameId, newProposals);\n }\n\n /**\n * @dev Ends the current turn of a game with the provided game ID. `gameId` is the ID of the game. `votes` is the array of votes. `newProposals` is the array of new proposals for the upcoming voting round. `proposerIndicies` is the array of indices of the proposers in the previous voting round.\n *\n * emits a _ProposalScore_ event for each player if the turn is not the first.\n * emits a _TurnEnded_ event.\n *\n * Modifies:\n *\n * - Calls the `_nextTurn` function with `gameId` and `newProposals`.\n * - Resets the number of commitments of the game with `gameId` to 0.\n * - Resets the proposal commitment hash and ongoing proposal of each player in the game with `gameId`.\n *\n * Requirements:\n *\n * - The caller must be a game master of the game with `gameId`.\n * - The game with `gameId` must have started.\n * - The game with `gameId` must not be over.\n * - newProposals array MUST be sorted randomly to ensure privacy\n * votes and proposerIndicies MUST correspond to players array from game.getPlayers()\n */\n function endTurn(\n uint256 gameId,\n uint256[][] memory votes,\n string[] memory newProposals, //REFERRING TO UPCOMING VOTING ROUND\n uint256[] memory proposerIndicies //REFERRING TO game.players index in PREVIOUS VOTING ROUND\n ) public {\n gameId.enforceIsGM(msg.sender);\n gameId.enforceHasStarted();\n gameId.enforceIsNotOver();\n IRankifyInstanceCommons.RInstance storage game = gameId.getGameStorage();\n uint256 turn = gameId.getTurn();\n\n address[] memory players = gameId.getPlayers();\n if (turn != 1) {\n (, uint256[] memory roundScores) = gameId.calculateScoresQuadratic(votes, proposerIndicies);\n for (uint256 i = 0; i < players.length; i++) {\n string memory proposal = game.ongoingProposals[proposerIndicies[i]];\n emit ProposalScore(gameId, turn, proposal, proposal, roundScores[i]);\n }\n }\n (, uint256[] memory scores) = gameId.getScores();\n emit TurnEnded(gameId, gameId.getTurn(), players, scores, newProposals, proposerIndicies, votes);\n\n // Clean up game instance for upcoming round\n\n game.numCommitments = 0;\n for (uint256 i = 0; i < players.length; i++) {\n game.proposalCommitmentHashes[players[i]] = bytes32(0);\n game.ongoingProposals[i] = \"\";\n game.playerVoted[players[i]] = false;\n game.votesHidden[players[i]].hash = bytes32(0);\n }\n // This data is to needed to correctly detetermine \"PlayerMove\" conditions during next turn\n game.numVotesPrevTurn = game.numVotesThisTurn;\n game.numVotesThisTurn = 0;\n game.numPrevProposals = game.numOngoingProposals;\n game.numOngoingProposals = 0;\n\n _nextTurn(gameId, newProposals);\n }\n}\n" + }, + "src/facets/RankifyInstanceGameOwnersFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {IRankifyInstanceCommons} from \"../interfaces/IRankifyInstanceCommons.sol\";\n\nimport \"../abstracts/draft-EIP712Diamond.sol\";\nimport \"../vendor/libraries/LibDiamond.sol\";\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {ERC165Checker} from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\n\nerror ZeroValue();\nerror WrongAddress();\nerror OutOfBounds();\n\ncontract RankifyInstanceGameOwnersFacet {\n using LibTBG for LibTBG.GameInstance;\n using LibTBG for uint256;\n using LibTBG for LibTBG.GameSettings;\n\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\n bytes32 position = LibTBG.getDataStorage();\n assembly {\n bog.slot := position\n }\n }\n\n /**\n * @dev Sets the game price. `newPrice` is the new game price.\n *\n * Modifies:\n *\n * - Sets the game price to `newPrice`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n */\n function setGamePrice(uint256 newPrice) external {\n LibDiamond.enforceIsContractOwner();\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n _RInstance.gamePrice = newPrice;\n }\n\n /**\n * @dev Sets the join game price. `newPrice` is the new join game price.\n *\n * Modifies:\n *\n * - Sets the join game price to `newPrice`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n */\n function setJoinGamePrice(uint256 newPrice) external {\n LibDiamond.enforceIsContractOwner();\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n _RInstance.joinGamePrice = newPrice;\n }\n\n /**\n * @dev Sets the rank token address. `newRankToken` is the new rank token address.\n *\n * Modifies:\n *\n * - Sets the rank token address to `newRankToken`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n * - `newRankToken` must not be the zero address.\n * - `newRankToken` must support the ERC1155 interface.\n */\n function setRankTokenAddress(address newRankToken) external {\n LibDiamond.enforceIsContractOwner();\n if (newRankToken == address(0)) {\n require(false, \"zerovalue\"); //revert ZeroValue();\n }\n if (!ERC165Checker.supportsInterface(newRankToken, type(IERC1155).interfaceId)) {\n require(false, \"wrongaddress\"); //revert WrongAddress();\n }\n\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n _RInstance.rankTokenAddress = newRankToken;\n }\n\n /**\n * @dev Sets the time per turn. `newTimePerTurn` is the new time per turn.\n *\n * Modifies:\n *\n * - Sets the time per turn to `newTimePerTurn`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n */\n function setTimePerTurn(uint256 newTimePerTurn) external {\n LibDiamond.enforceIsContractOwner();\n if (newTimePerTurn == 0) {\n require(false, \"zerovalue\"); // revert ZeroValue();\n }\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\n tbg.settings.timePerTurn = newTimePerTurn;\n }\n\n /**\n * @dev Sets the maximum number of players in a game. `newMaxPlayersSize` is the new maximum number of players.\n *\n * Modifies:\n *\n * - Sets the maximum number of players to `newMaxPlayersSize`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n * - `newMaxPlayersSize` must be greater than or equal to the minimum number of players.\n */\n function setMaxPlayersSize(uint256 newMaxPlayersSize) external {\n LibDiamond.enforceIsContractOwner();\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\n if (newMaxPlayersSize < tbg.settings.minPlayersSize) {\n require(false, \"outofbonds\"); // revert OutOfBounds();\n }\n tbg.settings.maxPlayersSize = newMaxPlayersSize;\n }\n\n /**\n * @dev Sets the minimum number of players in a game. `newMinPlayersSize` is the new minimum number of players.\n *\n * Modifies:\n *\n * - Sets the minimum number of players to `newMinPlayersSize`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n * - `newMinPlayersSize` must be less than or equal to the maximum number of players.\n */\n function setMinPlayersSize(uint256 newMinPlayersSize) external {\n LibDiamond.enforceIsContractOwner();\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\n if (newMinPlayersSize > tbg.settings.maxPlayersSize) {\n require(false, \"outofbonds\"); // revert OutOfBounds();\n }\n tbg.settings.minPlayersSize = newMinPlayersSize;\n }\n\n /**\n * @dev Sets the time to join a game. `newTimeToJoin` is the new time to join.\n *\n * Modifies:\n *\n * - Sets the time to join to `newTimeToJoin`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n * - `newTimeToJoin` must not be zero.\n */\n function setTimeToJoin(uint256 newTimeToJoin) external {\n LibDiamond.enforceIsContractOwner();\n if (newTimeToJoin == 0) {\n require(false, \"ZeroValue\"); //revert ZeroValue();\n }\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\n tbg.settings.timeToJoin = newTimeToJoin;\n }\n\n /**\n * @dev Sets the maximum number of turns in a game. `newMaxTurns` is the new maximum number of turns.\n *\n * Modifies:\n *\n * - Sets the maximum number of turns to `newMaxTurns`.\n *\n * Requirements:\n *\n * - The caller must be the contract owner.\n * - `newMaxTurns` must not be zero.\n */\n function setMaxTurns(uint256 newMaxTurns) external {\n LibDiamond.enforceIsContractOwner();\n if (newMaxTurns == 0) {\n require(false, \"ZeroValue\"); // revert ZeroValue();\n }\n LibTBG.TBGStorageStruct storage tbg = LibTBG.TBGStorage();\n tbg.settings.maxTurns = newMaxTurns;\n }\n}\n" + }, + "src/facets/RankifyInstanceMainFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {IRankifyInstanceCommons} from \"../interfaces/IRankifyInstanceCommons.sol\";\n\nimport {IERC1155Receiver} from \"../interfaces/IERC1155Receiver.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {IRankToken} from \"../interfaces/IRankToken.sol\";\nimport \"../abstracts/DiamondReentrancyGuard.sol\";\nimport {LibRankify} from \"../libraries/LibRankify.sol\";\nimport {LibCoinVending} from \"../libraries/LibCoinVending.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../abstracts/draft-EIP712Diamond.sol\";\n\nimport \"hardhat/console.sol\";\n\ncontract RankifyInstanceMainFacet is\n IRankifyInstanceCommons,\n IERC1155Receiver,\n DiamondReentrancyGuard,\n IERC721Receiver,\n EIP712\n{\n using LibTBG for LibTBG.GameInstance;\n using LibTBG for uint256;\n using LibTBG for LibTBG.GameSettings;\n using LibRankify for uint256;\n\n function RInstanceStorage() internal pure returns (RInstanceSettings storage bog) {\n bytes32 position = LibTBG.getDataStorage();\n assembly {\n bog.slot := position\n }\n }\n\n /**\n * @dev Creates a new game with the provided game master, game ID, and game rank. Optionally, additional ranks can be provided. `gameMaster` is the address of the game master. `gameId` is the ID of the new game. `gameRank` is the rank of the new game. `additionalRanks` is the array of additional ranks.\n *\n * emits a _GameCreated_ event.\n *\n * Requirements:\n * There are some game price requirments that must be met under gameId.newGame function that are set during the contract initialization and refer to the contract maintainer benefits.\n *\n * Modifies:\n *\n * - Calls the `newGame` function with `gameMaster`, `gameRank`, and `msg.sender`.\n * - Configures the coin vending with `gameId` and an empty configuration.\n * - If `additionalRanks` is not empty, mints rank tokens for each additional rank and sets the additional ranks of the game with `gameId` to `additionalRanks`.\n */\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank) public nonReentrant {\n gameId.newGame(gameMaster, gameRank, msg.sender);\n LibCoinVending.ConfigPosition memory emptyConfig;\n LibCoinVending.configure(bytes32(gameId), emptyConfig);\n emit gameCreated(gameId, gameMaster, msg.sender, gameRank);\n }\n\n function createGame(address gameMaster, uint256 gameId, uint256 gameRank, address[] memory additionalRanks) public {\n createGame(gameMaster, gameId, gameRank);\n RInstance storage game = gameId.getGameStorage();\n if (additionalRanks.length != 0) {\n for (uint256 i = 0; i < additionalRanks.length; i++) {\n IRankToken additonalRank = IRankToken(additionalRanks[i]);\n require(additonalRank.supportsInterface(type(IRankToken).interfaceId), \"must support rank interface\");\n require(additonalRank.getRankingInstance() == address(this), \"must be rankingInstance\");\n additonalRank.mint(address(this), 1, gameRank + 1, \"\");\n additonalRank.mint(address(this), 3, gameRank, \"\");\n }\n game.additionalRanks = additionalRanks;\n }\n }\n\n function createGame(address gameMaster, uint256 gameRank) public {\n LibRankify.enforceIsInitialized();\n RInstanceSettings storage settings = RInstanceStorage();\n createGame(gameMaster, settings.numGames + 1, gameRank);\n }\n\n /**\n * @dev Handles a player quitting a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * emits a _PlayerLeft_ event.\n *\n * Modifies:\n *\n * - Refunds the coins for `player` in the game with `gameId`.\n */\n function onPlayerQuit(uint256 gameId, address player) private {\n LibCoinVending.refund(bytes32(gameId), player);\n emit PlayerLeft(gameId, player);\n }\n\n /**\n * @dev Cancels a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Modifies:\n *\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\n *\n * Requirements:\n *\n * - The caller must be the game creator of the game with `gameId`.\n * - Game must not be started.\n */\n function cancelGame(uint256 gameId) public nonReentrant {\n gameId.enforceIsGameCreator(msg.sender);\n gameId.cancelGame(onPlayerQuit, LibDiamond.contractOwner());\n emit GameClosed(gameId);\n }\n\n /**\n * @dev Allows a player to leave a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Modifies:\n *\n * - Calls the `quitGame` function with `msg.sender`, `true`, and `onPlayerQuit`.\n *\n * Requirements:\n *\n * - The caller must be a player in the game with `gameId`.\n * - Game must not be started.\n */\n function leaveGame(uint256 gameId) public nonReentrant {\n gameId.quitGame(msg.sender, true, onPlayerQuit);\n }\n\n /**\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\n *\n * emits a _RegistrationOpen_ event.\n *\n * Modifies:\n *\n * - Calls the `enforceIsGameCreator` function with `msg.sender`.\n * - Calls the `enforceIsPreRegistrationStage` function.\n * - Calls the `openRegistration` function.\n *\n * Requirements:\n *\n * - The caller must be the game creator of the game with `gameId`.\n * - The game with `gameId` must be in the pre-registration stage.\n */\n function openRegistration(uint256 gameId) public {\n gameId.enforceIsGameCreator(msg.sender);\n gameId.enforceIsPreRegistrationStage();\n gameId.openRegistration();\n emit RegistrationOpen(gameId);\n }\n\n /**\n * @dev Allows a player to join a game with the provided game ID. `gameId` is the ID of the game.\n *\n * emits a _PlayerJoined_ event.\n *\n * Modifies:\n *\n * - Calls the `joinGame` function with `msg.sender`.\n * - Calls the `fund` function with `bytes32(gameId)`.\n *\n * Requirements:\n *\n * - The caller must not be a player in the game with `gameId`.\n * - Game phase must be registration.\n * - Caller must be able to fulfill funding requirements.\n */\n function joinGame(uint256 gameId) public payable nonReentrant {\n gameId.joinGame(msg.sender);\n LibCoinVending.fund(bytes32(gameId));\n emit PlayerJoined(gameId, msg.sender);\n }\n\n /**\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\n *\n * emits a _GameStarted_ event.\n *\n * Modifies:\n *\n * - Calls the `enforceGameExists` function.\n * - Calls the `startGameEarly` function.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n */\n function startGame(uint256 gameId) public {\n gameId.enforceGameExists();\n gameId.startGameEarly();\n emit GameStarted(gameId);\n }\n\n function onERC1155Received(\n address operator,\n address,\n uint256,\n uint256,\n bytes calldata\n ) public view override returns (bytes4) {\n LibRankify.enforceIsInitialized();\n if (operator == address(this)) {\n return bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"));\n }\n return bytes4(\"\");\n }\n\n function onERC1155BatchReceived(\n address operator,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external view override returns (bytes4) {\n LibRankify.enforceIsInitialized();\n if (operator == address(this)) {\n return bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"));\n }\n return bytes4(\"\");\n }\n\n function onERC721Received(\n address operator,\n address,\n uint256,\n bytes calldata\n ) external view override returns (bytes4) {\n LibRankify.enforceIsInitialized();\n if (operator == address(this)) {\n return IERC721Receiver.onERC721Received.selector;\n }\n return bytes4(\"\");\n }\n\n function getContractState() public view returns (RInstanceState memory) {\n RInstanceSettings storage settings = RInstanceStorage();\n LibTBG.GameSettings memory tbgSettings = LibTBG.getGameSettings();\n return (RInstanceState({BestOfState: settings, TBGSEttings: tbgSettings}));\n }\n\n function getTurn(uint256 gameId) public view returns (uint256) {\n return gameId.getTurn();\n }\n\n function getGM(uint256 gameId) public view returns (address) {\n return gameId.getGM();\n }\n\n function getScores(uint256 gameId) public view returns (address[] memory, uint256[] memory) {\n return gameId.getScores();\n }\n\n function isOvertime(uint256 gameId) public view returns (bool) {\n return gameId.isOvertime();\n }\n\n function isGameOver(uint256 gameId) public view returns (bool) {\n return gameId.isGameOver();\n }\n\n function getPlayersGame(address player) public view returns (uint256) {\n return LibTBG.getPlayersGame(player);\n }\n\n function isLastTurn(uint256 gameId) public view returns (bool) {\n return gameId.isLastTurn();\n }\n\n function isRegistrationOpen(uint256 gameId) public view returns (bool) {\n return gameId.isRegistrationOpen();\n }\n\n function gameCreator(uint256 gameId) public view returns (address) {\n return gameId.getGameStorage().createdBy;\n }\n\n function getGameRank(uint256 gameId) public view returns (uint256) {\n return gameId.getGameStorage().rank;\n }\n\n function getPlayers(uint256 gameId) public view returns (address[] memory) {\n return gameId.getPlayers();\n }\n\n function canStartGame(uint256 gameId) public view returns (bool) {\n return gameId.canStartEarly();\n }\n\n function canEndTurn(uint256 gameId) public view returns (bool) {\n return gameId.canEndTurnEarly();\n }\n}\n" + }, + "src/facets/RankifyInstanceRequirementsFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {LibCoinVending} from \"../libraries/LibCoinVending.sol\";\nimport {LibRankify} from \"../libraries/LibRankify.sol\";\n\ncontract RankifyInstanceRequirementsFacet {\n using LibTBG for uint256;\n using LibRankify for uint256;\n using LibTBG for LibTBG.GameInstance;\n event RequirementsConfigured(uint256 indexed gameId, LibCoinVending.ConfigPosition config);\n\n /**\n * @dev Sets the join requirements for a specific game.\n * Only the game creator can call this function.\n * The game must be in the pre-registration stage.\n *\n * @param gameId The ID of the game.\n * @param config The configuration position for the join requirements.\n */\n function setJoinRequirements(uint256 gameId, LibCoinVending.ConfigPosition memory config) public {\n gameId.enforceIsGameCreator(msg.sender);\n gameId.enforceIsPreRegistrationStage();\n LibCoinVending.configure(bytes32(gameId), config);\n emit RequirementsConfigured(gameId, config);\n }\n\n /**\n * @dev Retrieves the join requirements for a specific game.\n * @param gameId The ID of the game.\n * @return The join requirements as a `LibCoinVending.ConditionReturn` struct.\n */\n function getJoinRequirements(uint256 gameId) public view returns (LibCoinVending.ConditionReturn memory) {\n return LibCoinVending.getPosition(bytes32(gameId));\n }\n\n /**\n * @dev Retrieves the join requirements for a specific token in a game.\n * @param gameId The ID of the game.\n * @param contractAddress The address of the contract.\n * @param contractId The ID of the contract.\n * @param contractType The type of the contract.\n * @return The join requirements for the specified token.\n */\n function getJoinRequirementsByToken(\n uint256 gameId,\n address contractAddress,\n uint256 contractId,\n LibCoinVending.ContractTypes contractType\n ) public view returns (LibCoinVending.ContractCondition memory) {\n return LibCoinVending.getPositionByContract(bytes32(gameId), contractAddress, contractId, contractType);\n }\n}\n" + }, + "src/initializers/RankifyInstanceInit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\n/******************************************************************************\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\n* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535\n*\n* Implementation of a diamond.\n/******************************************************************************/\n\nimport {LibDiamond} from \"../vendor/libraries/LibDiamond.sol\";\nimport {IDiamondLoupe} from \"../vendor/interfaces/IDiamondLoupe.sol\";\nimport {IDiamondCut} from \"../vendor/interfaces/IDiamondCut.sol\";\nimport {IERC173} from \"../vendor/interfaces/IERC173.sol\";\nimport {IERC165} from \"../vendor/interfaces/IERC165.sol\";\nimport {LibEIP712WithStorage} from \"../libraries/LibEIP712Storage.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {IRankifyInstanceCommons} from \"../interfaces/IRankifyInstanceCommons.sol\";\nimport {IRankToken} from \"../interfaces/IRankToken.sol\";\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {LibQuadraticVoting} from \"../libraries/LibQuadraticVoting.sol\";\n// import {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"hardhat/console.sol\";\n\n// It is expected that this contract is customized if you want to deploy your diamond\n// with data from a deployment script. Use the init function to initialize state variables\n// of your diamond. Add parameters to the init funciton if you need to.\n\ncontract RankifyInstanceInit {\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\n bytes32 position = LibTBG.getDataStorage();\n assembly {\n bog.slot := position\n }\n }\n\n struct contractInitializer {\n uint256 timePerTurn;\n uint256 maxPlayersSize;\n uint256 minPlayersSize;\n address rankTokenAddress;\n uint256 timeToJoin;\n uint256 gamePrice;\n uint256 joinGamePrice;\n uint256 maxTurns;\n uint256 numWinners;\n uint256 voteCredits;\n string subject;\n address rankifyToken;\n }\n\n // You can add parameters to this function in order to pass in\n // data to set your own state variables\n function init(string memory name, string memory version, contractInitializer memory initializer) external {\n // adding ERC165 data\n LibDiamond.enforceIsContractOwner();\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n ds.supportedInterfaces[type(IERC165).interfaceId] = true;\n ds.supportedInterfaces[type(IDiamondCut).interfaceId] = true;\n ds.supportedInterfaces[type(IDiamondLoupe).interfaceId] = true;\n ds.supportedInterfaces[type(IERC173).interfaceId] = true;\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n LibEIP712WithStorage.LibEIP712WithStorageStorage storage ss = LibEIP712WithStorage.EIP712WithStorage();\n ss._HASHED_NAME = hashedName;\n ss._HASHED_VERSION = hashedVersion;\n ss._CACHED_CHAIN_ID = block.chainid;\n ss._CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n ss._CACHED_THIS = address(this);\n ss._TYPE_HASH = typeHash;\n\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n _RInstance.voting = LibQuadraticVoting.precomputeValues(initializer.voteCredits, initializer.minPlayersSize);\n _RInstance.gamePrice = initializer.gamePrice;\n _RInstance.joinGamePrice = initializer.joinGamePrice;\n require(initializer.rankifyToken != address(0), \"initializer.rankifyToken not set\");\n _RInstance.gamePaymentToken = initializer.rankifyToken;\n IRankToken rankContract = IRankToken(initializer.rankTokenAddress);\n require(\n rankContract.supportsInterface(type(IRankToken).interfaceId),\n \"RankifyInstance->init: rank token address does not support Rank interface\"\n );\n _RInstance.rankTokenAddress = initializer.rankTokenAddress;\n _RInstance.contractInitialized = true;\n\n LibTBG.GameSettings memory settings;\n settings.timePerTurn = initializer.timePerTurn;\n settings.maxPlayersSize = initializer.maxPlayersSize;\n settings.minPlayersSize = initializer.minPlayersSize;\n settings.timeToJoin = initializer.timeToJoin;\n settings.maxTurns = initializer.maxTurns;\n settings.numWinners = initializer.numWinners;\n settings.subject = initializer.subject;\n LibTBG.init(settings);\n\n // add your own state variables\n // EIP-2535 specifies that the `diamondCut` function takes two optional\n // arguments: address _init and bytes calldata _calldata\n // These arguments are used to execute an arbitrary function using delegatecall\n // in order to set state variables in the diamond during deployment or an upgrade\n // More info here: https://eips.ethereum.org/EIPS/eip-2535#diamond-interface\n }\n}\n" + }, + "src/interfaces/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title ERC1155 transfer receiver interface\n */\ninterface IERC1155Receiver {\n /**\n * @notice validate receipt of ERC1155 transfer\n * @param operator executor of transfer\n * @param from sender of tokens\n * @param id token ID received\n * @param value quantity of tokens received\n * @param data data payload\n * @return function's own selector if transfer is accepted\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @notice validate receipt of ERC1155 batch transfer\n * @param operator executor of transfer\n * @param from sender of tokens\n * @param ids token IDs received\n * @param values quantities of tokens received\n * @param data data payload\n * @return function's own selector if transfer is accepted\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "src/interfaces/ILockableERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {IERC1155} from \"@openzeppelin/contracts/interfaces/IERC1155.sol\";\n\n/**\n * @title ILockableERC1155\n * @dev Interface for a lockable ERC1155 token contract.\n */\ninterface ILockableERC1155 is IERC1155 {\n event TokensLocked(address indexed account, uint256 indexed id, uint256 value);\n\n event TokensUnlocked(address indexed account, uint256 indexed id, uint256 value);\n\n /**\n * @dev Locks a specified amount of tokens for a given account and token ID. `account` is the address of the account to lock the tokens for. `id` is the ID of the token to lock. `amount` is the amount of tokens to lock.\n *\n * emits a _TokensLocked_ event.\n */\n function lock(address account, uint256 id, uint256 amount) external;\n\n /**\n * @dev Unlocks a specified amount of tokens for a given account and token ID. `account` is the address of the account to unlock the tokens for. `id` is the ID of the token to unlock. `amount` is the amount of tokens to unlock.\n *\n * emits a _TokensUnlocked_ event.\n */\n function unlock(address account, uint256 id, uint256 amount) external;\n\n /**\n * @dev Returns the unlocked balance of tokens for a given account and token ID. `account` is the address of the account to check the unlocked balance for. `id` is the ID of the token to check the unlocked balance for.\n *\n * Returns:\n *\n * - The unlocked balance of tokens.\n */\n function unlockedBalanceOf(address account, uint256 id) external view returns (uint256);\n}\n" + }, + "src/interfaces/IRankifyInstanceCommons.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {LibCoinVending} from \"../libraries/LibCoinVending.sol\";\nimport {LibQuadraticVoting} from \"../libraries/LibQuadraticVoting.sol\";\n\ninterface IRankifyInstanceCommons {\n struct Score {\n address participant;\n uint256 score;\n }\n\n struct RInstanceSettings {\n uint256 gamePrice;\n address gamePaymentToken;\n uint256 joinGamePrice;\n uint256 numGames;\n address rankTokenAddress;\n bool contractInitialized;\n LibQuadraticVoting.qVotingStruct voting;\n }\n\n struct RInstanceState {\n RInstanceSettings BestOfState;\n LibTBG.GameSettings TBGSEttings;\n }\n\n struct VoteHidden {\n bytes32 hash;\n bytes proof;\n }\n\n struct RInstance {\n uint256 rank;\n address createdBy;\n mapping(uint256 => string) ongoingProposals; //Previous Turn Proposals (These are being voted on)\n uint256 numOngoingProposals;\n uint256 numPrevProposals;\n mapping(address => bytes32) proposalCommitmentHashes; //Current turn Proposal submittion\n uint256 numCommitments;\n mapping(address => VoteHidden) votesHidden;\n address[] additionalRanks;\n uint256 paymentsBalance;\n uint256 numVotesThisTurn;\n uint256 numVotesPrevTurn;\n mapping(address => bool) playerVoted;\n }\n\n event RegistrationOpen(uint256 indexed gameid);\n event PlayerJoined(uint256 indexed gameId, address participant);\n event GameStarted(uint256 indexed gameId);\n event gameCreated(uint256 gameId, address indexed gm, address indexed creator, uint256 indexed rank);\n event GameClosed(uint256 indexed gameId);\n event PlayerLeft(uint256 indexed gameId, address indexed player);\n}\n" + }, + "src/interfaces/IRankToken.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {ILockableERC1155} from \"./ILockableERC1155.sol\";\n\ninterface IRankToken is ILockableERC1155 {\n event RankingInstanceUpdated(address indexed newRankingInstance);\n\n event LevelUp(address indexed account, uint256 id);\n\n /**\n * @dev Mints a specified amount of tokens to an account. `to` is the address of the account to mint the tokens to. `amount` is the amount of tokens to mint. `poolId` is the ID of the pool. `data` is the additional data.\n */\n function mint(address to, uint256 amount, uint256 poolId, bytes memory data) external;\n\n /**\n * @dev Mints specified amounts of tokens to an account. `to` is the address of the account to mint the tokens to. `ids` is the array of IDs of the tokens to mint. `amounts` is the array of amounts of tokens to mint. `data` is the additional data.\n */\n function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;\n\n /**\n * @dev Levels up an account. `to` is the address of the account to level up. `id` is the ID of the token. `data` is the additional data.\n *\n * emits a _LevelUp_ event.\n */\n function levelUp(address to, uint256 id, bytes memory data) external;\n\n /**\n * @dev Updates the ranking instance. `newRankingInstance` is the address of the new ranking instance.\n *\n * emits a _RankingInstanceUpdated_ event.\n */\n function updateRankingInstance(address newRankingInstance) external;\n\n /**\n * @dev Gets the ranking instance which can emit new rank updates and mint rank tokens.\n *\n * Returns:\n *\n * - The address of the ranking instance.\n */\n function getRankingInstance() external view returns (address);\n\n /**\n * @dev Finds the new rank of an account. `account` is the address of the account. `oldRank` is the old rank of the account.\n * It checks the balance of the account and returns the new rank that can be upgraded to.\n *\n * Returns:\n *\n * - The new rank of the account.\n */\n function findNewRank(address account, uint256 oldRank) external view returns (uint256);\n\n /**\n * @dev Gets the rank of an account. `account` is the address of the account.\n *\n * Returns:\n *\n * - The rank of the account.\n */\n function getAccountRank(address account) external view returns (uint256);\n}\n" + }, + "src/libraries/LibArray.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\nimport \"hardhat/console.sol\";\n\nlibrary LibArray {\n /**\n * @dev Sorts the elements of the array in ascending order using the quicksort algorithm.\n *\n * Requirements:\n *\n * - The array to be sorted must not be empty.\n * - The starting and ending indices must be within the bounds of the array.\n *\n * Modifies:\n *\n * - The array is sorted in ascending order.\n *\n * Note:\n *\n * - This function uses the in-place quicksort algorithm, which has an average-case complexity of O(n log n) and a worst-case complexity of O(n^2).\n */\n function quickSort(uint256[] memory arr, int256 left, int256 right) internal view {\n int256 i = left;\n int256 j = right;\n if (i == j) return;\n uint256 pivot = arr[uint256(left + (right - left) / 2)];\n while (i <= j) {\n while (arr[uint256(i)] > pivot) i++;\n while (pivot > arr[uint256(j)]) j--;\n if (i <= j) {\n (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]);\n i++;\n j--;\n }\n }\n if (left < j) quickSort(arr, left, j);\n if (i < right) quickSort(arr, i, right);\n }\n}\n" + }, + "src/libraries/LibCoinVending.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Author: Tim Pechersky <@Peersky>\n\npragma solidity ^0.8.20;\n\nimport {MockERC20} from \"../mocks/MockERC20.sol\";\nimport {ERC1155Burnable} from \"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\";\n\n/**\n * @dev This library is used to simulate the vending machine coin acceptor state machine that:\n * - Supports large number of positions; Each represents requirements to acess different goods of the virtual vending machine.\n * - Accepts multiple assets of following types: Native (Eth), ERC20, ERC721, and ERC1155 tokens that can be stacked together.\n * - Allows for each individual asset action promise can be one of following:\n * - Lock: The asset is locked in the acceptor with promise that asset will be returned to the sender at release funds time.\n * - Bet: The asset is locked in the acceptor with promise that asset will be awarded to benificiary at release funds time.\n * - Pay: The asset is locked in the acceptor with promise that asset will be paid to payee at release funds time.\n * - Burn: The asset is locked in the acceptor with promise that asset will be destroyed at release funds time.\n * - Maintains each position balance, hence allowing multiple participants to line up for the same position.\n * - Allows three actions:\n * - Fund position with assets\n * - Refund assets to user\n * - Consume assets and provide goods to user\n * - Consuming asset might take a form of\n * - Transferring assets to payee\n * - Burning assets\n * - Awarding beneficiary with assets\n * - Returning locked assets back to sender\n *\n * This library DOES enforces that any position can only be refunded or processed only within amount funded boundaries\n * This library DOES NOT store the addresses of senders, nor benificiaries, nor payees.\n * This is to be stored within implementation contract.\n *\n *\n * !!!!! IMPORTANT !!!!!\n * This library does NOT invocates reentrancy guards. It is implementation contract's responsibility to enforce reentrancy guards.\n * Reentrancy guards MUST be implemented in an implementing contract.\n *\n * Usage:\n *\n * 0. Configure position via configure(...)\n * 1. fund position with assets via fund(...)\n * 2. release or refund assets via release(...) or refund(...)\n * 3. repeat steps 1 and 2 as needed.\n * Position can be recofigured at any time when it's effective balance is zero: `timesFunded - timesRefuned - timesReleased = 0`\n *\n *\n * Test state:\n * This library most functionality has been tested: see ../tests/LibCoinVending.ts and ../tests/report.md for details.\n *\n * ERC721 token is checked only for \"HAVE\" condition since putting requirements on non fungable token id yet to be resolved.\n * (see ERC721 section in the code below)\n *\n * This library has not been yet audited\n *\n */\nlibrary LibCoinVending {\n struct Condition {\n mapping(ContractTypes => mapping(address => mapping(uint256 => ContractCondition))) contracts;\n NumericCondition ethValues;\n uint256 timesRefunded;\n uint256 timesReleased;\n uint256 timesFunded;\n ContractTypes[] contractTypes;\n address[] contractAddresses;\n uint256[] contractIds;\n bool _isConfigured;\n }\n enum RequirementTypes {\n HAVE,\n LOCK,\n BURN,\n BET,\n PAY\n }\n\n struct TransactionProperties {\n bytes data;\n uint256 amount;\n }\n struct ContractCondition {\n TransactionProperties have;\n TransactionProperties lock;\n TransactionProperties burn;\n TransactionProperties pay;\n TransactionProperties bet;\n }\n\n struct NumericCondition {\n uint256 have;\n uint256 lock;\n uint256 burn;\n uint256 pay;\n uint256 bet;\n }\n\n enum TransferTypes {\n FUND,\n REFUND,\n RELEASE\n }\n\n struct ConditionReturn {\n NumericCondition ethValues;\n uint256 timesRefunded;\n uint256 timesReleased;\n uint256 timesFunded;\n address[] contractAddresses;\n uint256[] contractIds;\n ContractTypes[] contractTypes;\n bool _isConfigured;\n }\n\n struct configSmartRequirement {\n address contractAddress;\n uint256 contractId;\n ContractTypes contractType;\n ContractCondition contractRequirement;\n }\n\n struct ConfigPosition {\n NumericCondition ethValues;\n configSmartRequirement[] contracts;\n }\n\n struct LibCoinVendingStorage {\n mapping(bytes32 => Condition) positions;\n address beneficiary;\n }\n\n enum ContractTypes {\n ERC20,\n ERC1155,\n ERC721\n }\n\n bytes32 constant COIN_VENDING_STORAGE_POSITION = keccak256(\"coin.vending.storage.position\");\n\n function coinVendingPosition(bytes32 position) internal view returns (Condition storage) {\n return coinVendingStorage().positions[keccak256(abi.encode(position))];\n }\n\n function coinVendingStorage() internal pure returns (LibCoinVendingStorage storage es) {\n bytes32 position = COIN_VENDING_STORAGE_POSITION;\n assembly {\n es.slot := position\n }\n }\n\n /**\n * @dev Transfers a specified amount of tokens from one address to another, or burns them if the destination address is zero.\n *\n * Requirements:\n *\n * - The `value` must be non-zero.\n * - The `from` address must have a sufficient token balance.\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\n *\n * Modifies:\n *\n * - The token balances of the `from` and `to` addresses, or the total supply of tokens if `to` is the zero address.\n */\n function trasferFromAny(address erc20Addr, address from, address to, uint256 value) private {\n MockERC20 token = MockERC20(erc20Addr);\n if (value != 0) {\n if (from == address(this)) {\n if (to != address(0)) {\n token.transfer(to, value);\n } else {\n token.burn(value);\n }\n } else {\n if (to != address(0)) {\n token.transferFrom(from, to, value);\n } else {\n token.transferFrom(from, address(this), value);\n token.burn(value);\n }\n }\n }\n }\n\n /**\n * @dev Fulfills the ERC20 token transfer according to the specified rules.\n *\n * Requirements:\n *\n * - The `from` address must have a sufficient token balance.\n * - If the `from` address is not this contract, it must have approved this contract to transfer tokens on its behalf.\n *\n * Modifies:\n *\n * - The token balances of the `from` and `to` addresses.\n */\n function fulfillERC20(\n address erc20Addr,\n ContractCondition storage tokenReq,\n address from,\n address payee,\n address beneficiary,\n address burnAddress,\n address lockAddress\n ) private {\n trasferFromAny(erc20Addr, from, lockAddress, tokenReq.lock.amount);\n trasferFromAny(erc20Addr, from, burnAddress, tokenReq.burn.amount);\n trasferFromAny(erc20Addr, from, payee, tokenReq.pay.amount);\n trasferFromAny(erc20Addr, from, beneficiary, tokenReq.bet.amount);\n MockERC20 token = MockERC20(erc20Addr);\n uint256 value = tokenReq.have.amount;\n if (value != 0 && from != address(this)) {\n require(token.balanceOf(from) >= value, \"Not enough erc20 tokens\");\n }\n }\n\n /**\n * @dev Fulfills the ERC721 token transfer according to the specified rules.\n *\n * Requirements:\n *\n * - The `from` address must own the token.\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\n *\n * Modifies:\n *\n * - The token ownership from the `from` address to the `to` address.\n *\n * Notes:\n *\n * Due to non fungable nature it's an open question how to implement this method correctly for lock/burn/pay/bet cases.\n * In this library I assume that requirements are for multiple members, hence it makes no sense to put requirement on particular tokenId for ERC721.\n * I think best approach would be to split in to two methods:\n * 1. fulfillERC72Balance: Treats tokens as fungible - requires one to lock/burn/pay/bet ANY token id, but in total should be equal to desired value.\n * 2. fulfillERC721Ids: Requires one to lock/burn/pay/bet specific token id. (useful when requirements are unique per applicant).\n * fulfillERC72Balance is easy. fulfillERC721Ids brings up a question of how to select those ID's(since must specify for ERC721 contract on transfer method).\n * Two possible solutions:\n * 1: modify fund() method to accept array of address+id pairs of NFT's and parse trough it. Compucationaly inefficient.\n * 2: implement onERC721Received such that there is NFT vault in the contract, later fill funding position from that vault. That way applicant could pre-send NFT's to the contract and callfing fund later would pull those out from the vault.\n\n */\n function fulfillERC72Balance(address erc721addr, ContractCondition storage tokenReq, address from) private view {\n ERC721 token = ERC721(erc721addr);\n\n require(\n tokenReq.lock.amount == 0 &&\n tokenReq.burn.amount == 0 &&\n tokenReq.pay.amount == 0 &&\n tokenReq.bet.amount == 0,\n \"ERC721 transfers not supported\"\n );\n if (tokenReq.have.amount != 0 && from != address(this)) {\n uint256 balance = token.balanceOf(from);\n require(balance >= tokenReq.have.amount, \"Not enough ERC721 balance\");\n }\n }\n\n /**\n * @dev Fulfills the ERC1155 token transfer according to the specified rules.\n *\n * Requirements:\n *\n * - The `from` address must own the token.\n * - If the `from` address is not this contract, it must have approved this contract to transfer the token on its behalf.\n *\n * Modifies:\n *\n * - The token ownership from the `from` address to the `to` address.\n */\n function fulfillERC1155(\n address erc1155addr,\n uint256 id,\n ContractCondition storage tokenReq,\n address from,\n address payee,\n address beneficiary,\n address burnAddress,\n address lockAddress\n ) private {\n ERC1155Burnable token = ERC1155Burnable(erc1155addr);\n uint256 value = tokenReq.have.amount;\n if (value != 0) {\n uint256 balance = token.balanceOf(from, id);\n require(balance >= value, \"ERC1155 balance is not valid\");\n }\n value = tokenReq.pay.amount;\n if (value != 0) {\n // token.transfe\n token.safeTransferFrom(from, payee, id, value, tokenReq.pay.data);\n }\n value = tokenReq.bet.amount;\n if (value != 0) {\n token.safeTransferFrom(from, beneficiary, id, value, tokenReq.bet.data);\n }\n value = tokenReq.burn.amount;\n if (value != 0) {\n if (burnAddress == address(0)) {\n token.burn(from, id, value);\n } else {\n token.safeTransferFrom(from, burnAddress, id, value, tokenReq.burn.data);\n }\n }\n value = tokenReq.lock.amount;\n if (value != 0) {\n token.safeTransferFrom(from, lockAddress, id, value, tokenReq.lock.data);\n }\n }\n\n /**\n * @dev Fulfills the conditions of a position.\n *\n * Requirements:\n *\n * - If `from` is not this contract, the sent value must be greater than or equal to the sum of the locked, paid, bet, and burned values.\n *\n * Modifies:\n *\n * - Transfers the specified amounts of Ether to the lock, payee, beneficiary, and burn addresses.\n */\n function fulfill(\n Condition storage position,\n address from,\n address payee,\n address beneficiary,\n address burnAddress,\n address lockAddress\n ) private {\n if (from == address(this)) {\n if (position.ethValues.lock != 0) {\n payable(lockAddress).transfer(position.ethValues.lock);\n }\n if (position.ethValues.pay != 0) {\n payable(payee).transfer(position.ethValues.pay);\n }\n if (position.ethValues.bet != 0) {\n payable(beneficiary).transfer(position.ethValues.bet);\n }\n if (position.ethValues.burn != 0) {\n payable(burnAddress).transfer(position.ethValues.burn);\n }\n } else {\n uint256 VLReq = position.ethValues.lock +\n position.ethValues.pay +\n position.ethValues.bet +\n position.ethValues.burn;\n require(msg.value >= VLReq, \"msg.value too low\");\n }\n for (uint256 i = 0; i < position.contractAddresses.length; i++) {\n address contractAddress = position.contractAddresses[i];\n uint256 id = position.contractIds[i];\n ContractTypes contractType = position.contractTypes[i];\n ContractCondition storage requirement = position.contracts[contractType][contractAddress][id];\n if (contractType == ContractTypes.ERC20) {\n fulfillERC20(contractAddress, requirement, from, payee, beneficiary, burnAddress, lockAddress);\n } else if (contractType == ContractTypes.ERC721) {\n fulfillERC72Balance(\n contractAddress,\n // id,\n requirement,\n from\n // payee,\n // beneficiary,\n // burnAddress,\n // lockAddress\n );\n } else if (contractType == ContractTypes.ERC1155) {\n fulfillERC1155(contractAddress, id, requirement, from, payee, beneficiary, burnAddress, lockAddress);\n }\n }\n }\n\n /**\n * @dev Refunds the balance of a condition to the specified address.\n *\n * `reqPos` The storage reference to the condition.\n * `to` The address to refund the balance to.\n *\n * Requirements:\n *\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\n *\n * Modifies:\n *\n * - Transfers the remaining balance of the condition to the `to` address.\n * - Increments the `timesRefunded` counter for the condition.\n */\n function _refund(Condition storage reqPos, address to) private {\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \"Not enough balance to refund\");\n fulfill(reqPos, address(this), to, to, to, to);\n reqPos.timesRefunded += 1;\n }\n\n /**\n * @dev Returns all position requirements back to fundee. `position` is the identifier of the condition. `to` is the address to refund the balance to.\n *\n * Requirements:\n *\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\n *\n * Modifies:\n *\n * - Transfers the remaining balance of the condition to the `to` address.\n * - Increments the `timesRefunded` counter for the condition.\n */\n function refund(bytes32 position, address to) internal {\n Condition storage reqPos = coinVendingPosition(position);\n _refund(reqPos, to);\n }\n\n /**\n * @dev Returns all position requirements back to multiple fundees. `position` is the identifier of the condition. `returnAddresses` is an array of addresses to refund the balance to.\n *\n * Requirements:\n *\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\n *\n * Modifies:\n *\n * - Transfers the remaining balance of the condition to each address in `returnAddresses`.\n * - Increments the `timesRefunded` counter for the condition for each address in `returnAddresses`.\n */\n function batchRefund(bytes32 position, address[] memory returnAddresses) internal {\n Condition storage reqPos = coinVendingPosition(position);\n for (uint256 i = 0; i < returnAddresses.length; i++) {\n _refund(reqPos, returnAddresses[i]);\n }\n }\n\n function _release(Condition storage reqPos, address payee, address beneficiary, address returnAddress) private {\n require((reqPos.timesRefunded + reqPos.timesReleased) < reqPos.timesFunded, \"Not enough balance to release\");\n fulfill(reqPos, address(this), payee, beneficiary, address(0), returnAddress);\n reqPos.timesReleased += 1;\n }\n\n /**\n * @dev Releases the funds from a coin vending position to the specified addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddress` are the addresses to release the funds to.\n *\n * Requirements:\n *\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\n *\n * Modifies:\n *\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and `returnAddress`.\n * - Increments the `timesReleased` counter for the condition.\n */\n function release(bytes32 position, address payee, address beneficiary, address returnAddress) internal {\n Condition storage reqPos = coinVendingPosition(position);\n _release(reqPos, payee, beneficiary, returnAddress);\n }\n\n /**\n * @dev Releases the funds from a coin vending position to multiple return addresses. `position` is the identifier of the condition. `payee`, `beneficiary`, and `returnAddresses` are the addresses to release the funds to.\n *\n * Requirements:\n *\n * - The sum of `timesRefunded` and `timesReleased` for the condition must be less than `timesFunded`.\n *\n * Modifies:\n *\n * - Transfers the remaining balance of the condition to the `payee`, `beneficiary`, and each address in `returnAddresses`.\n * - Increments the `timesReleased` counter for the condition for each address in `returnAddresses`.\n */\n function batchRelease(\n bytes32 position,\n address payee,\n address beneficiary,\n address[] memory returnAddresses\n ) internal {\n Condition storage reqPos = coinVendingPosition(position);\n for (uint256 i = 0; i < returnAddresses.length; i++) {\n {\n _release(reqPos, payee, beneficiary, returnAddresses[i]);\n }\n }\n }\n\n function _fund(Condition storage reqPos, address funder) private {\n require(reqPos._isConfigured, \"Position does not exist\");\n fulfill(reqPos, funder, address(this), address(this), address(this), address(this));\n reqPos.timesFunded += 1;\n }\n\n /**\n * @dev Funds the position by `msg.sender`. `position` is the identifier of the condition.\n *\n * Requirements:\n *\n * - The condition must be configured.\n *\n * Modifies:\n *\n * - Transfers the funds from `msg.sender` to this contract.\n * - Increments the `timesFunded` counter for the condition.\n */\n function fund(bytes32 position) internal {\n Condition storage reqPos = coinVendingPosition(position);\n _fund(reqPos, msg.sender);\n }\n\n /**\n * @dev Configures the position. `position` is the identifier of the condition. `configuration` is the new configuration for the condition.\n *\n * Requirements:\n *\n * - The condition must not have a positive balance.\n *\n * Modifies:\n *\n * - Sets the configuration of the condition to `configuration`.\n */\n function configure(bytes32 position, ConfigPosition memory configuration) internal {\n Condition storage mustDo = coinVendingPosition(position);\n require(\n mustDo.timesFunded == 0 || (mustDo.timesFunded == (mustDo.timesRefunded + mustDo.timesReleased)),\n \"Cannot mutate position with currently positive balance\"\n );\n mustDo.ethValues = configuration.ethValues;\n delete mustDo.contractAddresses;\n delete mustDo.contractIds;\n delete mustDo.contractTypes;\n for (uint256 i = 0; i < configuration.contracts.length; i++) {\n mustDo.contractAddresses.push(configuration.contracts[i].contractAddress);\n mustDo.contractIds.push(configuration.contracts[i].contractId);\n mustDo.contractTypes.push(configuration.contracts[i].contractType);\n mustDo.contracts[configuration.contracts[i].contractType][configuration.contracts[i].contractAddress][\n configuration.contracts[i].contractId\n ] = configuration.contracts[i].contractRequirement;\n }\n mustDo._isConfigured = true;\n }\n\n /**\n * @dev Returns the condition associated with the given position. `position` is the identifier of the condition.\n *\n * Returns:\n *\n * - The condition associated with `position`.\n */\n function getPosition(bytes32 position) internal view returns (ConditionReturn memory) {\n Condition storage pos = coinVendingPosition(position);\n ConditionReturn memory ret;\n ret.ethValues = pos.ethValues;\n ret.timesFunded = pos.timesFunded;\n ret.timesRefunded = pos.timesRefunded;\n ret.timesReleased = pos.timesReleased;\n ret._isConfigured = pos._isConfigured;\n ret.contractAddresses = pos.contractAddresses;\n ret.contractIds = pos.contractIds;\n ret.contractTypes = pos.contractTypes;\n return ret;\n }\n\n /**\n * @dev Returns the contract condition associated with the given position, contract address, contract ID, and contract type. `position` is the identifier of the condition. `contractAddress` is the address of the contract. `contractId` is the ID of the contract. `contractType` is the type of the contract.\n *\n * Returns:\n *\n * - The contract condition associated with `position`, `contractAddress`, `contractId`, and `contractType`.\n */\n function getPositionByContract(\n bytes32 position,\n address contractAddress,\n uint256 contractId,\n ContractTypes contractType\n ) internal view returns (ContractCondition memory) {\n Condition storage pos = coinVendingPosition(position);\n return pos.contracts[contractType][contractAddress][contractId];\n }\n}\n" + }, + "src/libraries/LibEIP712Storage.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport {IDiamondCut} from \"../vendor/interfaces/IDiamondCut.sol\";\n\nlibrary LibEIP712WithStorage {\n bytes32 constant EIP712_STORAGE_POSITION = keccak256(\"EIP.712.STORAGE.POSITION\");\n\n struct LibEIP712WithStorageStorage {\n bytes32 _CACHED_DOMAIN_SEPARATOR;\n uint256 _CACHED_CHAIN_ID;\n address _CACHED_THIS;\n bytes32 _HASHED_NAME;\n bytes32 _HASHED_VERSION;\n bytes32 _TYPE_HASH;\n }\n\n function EIP712WithStorage() internal pure returns (LibEIP712WithStorageStorage storage ds) {\n bytes32 position = EIP712_STORAGE_POSITION;\n assembly {\n ds.slot := position\n }\n }\n}\n" + }, + "src/libraries/LibQuadraticVoting.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nerror quadraticVotingError(string paramter, uint256 arg, uint256 arg2);\n\n/**\n * @title LibQuadraticVoting\n * @dev A library for quadratic voting calculations.\n */\nlibrary LibQuadraticVoting {\n struct qVotingStruct {\n uint256 voteCredits;\n uint256 maxQuadraticPoints;\n uint256 minQuadraticPositons;\n }\n\n /**\n * @dev Precomputes the values for quadratic voting. `voteCredits` is the total number of vote credits. `minExpectedVoteItems` is the minimum expected number of vote items.\n *\n * Returns:\n *\n * - A `qVotingStruct` containing the precomputed values.\n */\n function precomputeValues(\n uint256 voteCredits,\n uint256 minExpectedVoteItems\n ) internal pure returns (qVotingStruct memory) {\n qVotingStruct memory q;\n\n q.maxQuadraticPoints = Math.sqrt(voteCredits);\n\n // This block finds how many vote positions are needed to distribute all quadratic vote points.\n uint256 iterator = 0;\n uint256 accumulator = 0;\n do {\n iterator++;\n accumulator += iterator ** 2;\n } while (accumulator < voteCredits);\n // This enforces requirement that all vote credits can indeed be spended (no leftovers)\n if (accumulator != voteCredits) require(false, \"quadraticVotingError\"); //revert quadraticVotingError(\"voteCredits bust be i^2 series\", accumulator, voteCredits);\n q.minQuadraticPositons = iterator;\n // In order to spend all vote credits there must be at least minQuadraticPositons+1 (becuase proposer is also a player and cannot vote for himself)\n if (minExpectedVoteItems <= q.minQuadraticPositons) require(false, \"quadraticVotingError\");\n // revert quadraticVotingError(\n // \"Minimum Voting positions above min players\",\n // q.minQuadraticPositons,\n // minExpectedVoteItems\n // );\n q.voteCredits = voteCredits;\n return q;\n }\n\n /**\n * @dev Computes the scores for each proposal by voter preference index. `q` is the precomputed quadratic voting values. `VotersVotes` is a 2D array of votes, where each row corresponds to a voter and each column corresponds to a proposal. `voterVoted` is an array indicating whether each voter has voted. `notVotedGivesEveyone` is the number of points to distribute to each proposal for each voter that did not vote. `proposalsLength` is the number of proposals.\n *\n * Returns:\n *\n * - An array of scores for each proposal.\n */\n function computeScoresByVPIndex(\n qVotingStruct memory q,\n uint256[][] memory VotersVotes,\n bool[] memory voterVoted,\n uint256 notVotedGivesEveyone,\n uint256 proposalsLength\n ) internal pure returns (uint256[] memory) {\n uint256[] memory scores = new uint256[](proposalsLength);\n uint256[] memory creditsUsed = new uint256[](VotersVotes.length);\n\n for (uint256 proposalIdx = 0; proposalIdx < proposalsLength; proposalIdx++) {\n //For each proposal\n scores[proposalIdx] = 0;\n for (uint256 vi = 0; vi < VotersVotes.length; vi++) {\n // For each potential voter\n uint256[] memory voterVotes = VotersVotes[vi];\n if (!voterVoted[vi]) {\n // Check if voter wasn't voting\n scores[proposalIdx] += notVotedGivesEveyone; // Gives benefits to everyone but himself\n creditsUsed[vi] = q.voteCredits;\n } else {\n //If voter voted\n scores[proposalIdx] += voterVotes[proposalIdx];\n creditsUsed[vi] += voterVotes[proposalIdx] ** 2;\n if (creditsUsed[vi] > q.voteCredits) require(false, \"quadraticVotingError\"); // revert quadraticVotingError(\"Quadratic: vote credits overrun\", q.voteCredits, creditsUsed[vi]);\n }\n }\n }\n return scores;\n }\n}\n" + }, + "src/libraries/LibRankify.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\nimport {LibTBG} from \"../libraries/LibTurnBasedGame.sol\";\nimport {IRankifyInstanceCommons} from \"../interfaces/IRankifyInstanceCommons.sol\";\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {IRankToken} from \"../interfaces/IRankToken.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/interfaces/IERC20.sol\";\nimport {LibQuadraticVoting} from \"./LibQuadraticVoting.sol\";\nimport \"hardhat/console.sol\";\n\nlibrary LibRankify {\n using LibTBG for LibTBG.GameInstance;\n using LibTBG for uint256;\n using LibTBG for LibTBG.GameSettings;\n using LibQuadraticVoting for LibQuadraticVoting.qVotingStruct;\n\n /**\n * @dev Compares two strings for equality. `a` and `b` are the strings to compare.\n *\n * Returns:\n *\n * - `true` if the strings are equal, `false` otherwise.\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n\n /**\n * @dev Returns the game storage for the given game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - The game storage for `gameId`.\n */\n function getGameStorage(uint256 gameId) internal view returns (IRankifyInstanceCommons.RInstance storage game) {\n bytes32 position = LibTBG.getGameDataStorage(gameId);\n assembly {\n game.slot := position\n }\n }\n\n /**\n * @dev Returns the Rankify InstanceSettings storage.\n *\n * Returns:\n *\n * - The RInstanceSettings storage.\n */\n function RInstanceStorage() internal pure returns (IRankifyInstanceCommons.RInstanceSettings storage bog) {\n bytes32 position = LibTBG.getDataStorage();\n assembly {\n bog.slot := position\n }\n }\n\n bytes32 internal constant _PROPOSAL_PROOF_TYPEHASH =\n keccak256(\"signProposalByGM(uint256 gameId,uint256 turn,bytes32 proposalNHash,string encryptedProposal)\");\n bytes32 internal constant _VOTE_PROOF_TYPEHASH =\n keccak256(\"signVote(uint256 vote1,uint256 vote2,uint256 vote3,uint256 gameId,uint256 turn,bytes32 salt)\");\n bytes32 internal constant _VOTE_SUBMIT_PROOF_TYPEHASH =\n keccak256(\"publicSignVote(uint256 gameId,uint256 turn,bytes32 vote1,bytes32 vote2,bytes32 vote3)\");\n\n /**\n * @dev Ensures that the contract is initialized.\n *\n * Requirements:\n *\n * - The contract must be initialized.\n */\n function enforceIsInitialized() internal view {\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n require(settings.contractInitialized, \"onlyInitialized\");\n }\n\n /**\n * @dev Ensures that the game with the given ID exists. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n */\n function enforceGameExists(uint256 gameId) internal view {\n enforceIsInitialized();\n require(gameId.gameExists(), \"no game found\");\n }\n\n /**\n * @dev Creates a new game with the given parameters. `gameId` is the ID of the new game. `gameMaster` is the address of the game master. `gameRank` is the rank of the game. `creator` is the address of the creator of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must not already exist.\n * - `gameRank` must not be 0.\n * - If the game price is not 0, the `creator` must have approved this contract to transfer the game price amount of the game payment token on their behalf.\n *\n * Modifies:\n *\n * - Creates a new game with `gameId`.\n * - Transfers the game price amount of the game payment token from `creator` to this contract.\n * - Sets the payments balance of the game to the game price.\n * - Sets the creator of the game to `creator`.\n * - Increments the number of games.\n * - Sets the rank of the game to `gameRank`.\n * - Mints new rank tokens.\n */\n function newGame(uint256 gameId, address gameMaster, uint256 gameRank, address creator) internal {\n LibRankify.enforceIsInitialized();\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n gameId.createGame(gameMaster); // This will enforce game does not exist yet\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n require(gameRank != 0, \"game rank not specified\");\n if (settings.gamePrice != 0) {\n IERC20(settings.gamePaymentToken).transferFrom(creator, address(this), settings.gamePrice);\n game.paymentsBalance = settings.gamePrice;\n }\n\n game.createdBy = creator;\n settings.numGames += 1;\n game.rank = gameRank;\n\n IRankToken rankTokenContract = IRankToken(settings.rankTokenAddress);\n rankTokenContract.mint(address(this), 1, gameRank + 1, \"\");\n rankTokenContract.mint(address(this), 3, gameRank, \"\");\n }\n\n /**\n * @dev Ensures that the candidate is the creator of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - `candidate` must be the creator of the game.\n */\n function enforceIsGameCreator(uint256 gameId, address candidate) internal view {\n enforceGameExists(gameId);\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n require(game.createdBy == candidate, \"Only game creator\");\n }\n\n /**\n * @dev Ensures that the candidate is the game master of the game with the given ID. `gameId` is the ID of the game. `candidate` is the address of the candidate.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - `candidate` must be the game master of the game.\n */\n function enforceIsGM(uint256 gameId, address candidate) internal view {\n enforceGameExists(gameId);\n require(gameId.getGM() == candidate, \"Only game master\");\n }\n\n /**\n * @dev Locks the rank token of the player. `player` is the address of the player. `gameRank` is the rank of the game. `rankTokenAddress` is the address of the rank token contract.\n *\n * Requirements:\n *\n * - `RankTokenAddress` must support `IRankToken` interface\n *\n * Modifies:\n *\n * - Locks `gameRank` rank of `player` in the rank token contract.\n */\n function _fulfillRankRq(address player, uint256 gameRank, address rankTokenAddress) private {\n IRankToken rankToken = IRankToken(rankTokenAddress);\n rankToken.lock(player, gameRank, 1);\n }\n\n /**\n * @dev Allows a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - If the join game price is not 0, the `player` must have approved this contract to transfer the join game price amount of the game payment token on their behalf.\n *\n * Modifies:\n *\n * - Transfers the join game price amount of the game payment token from `player` to this contract.\n * - Increases the payments balance of the game by the join game price.\n * - Adds `player` to the game.\n */\n function joinGame(uint256 gameId, address player) internal {\n enforceGameExists(gameId);\n fulfillRankRq(gameId, player);\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n if (_RInstance.joinGamePrice != 0) {\n IERC20(_RInstance.gamePaymentToken).transferFrom(player, address(this), _RInstance.joinGamePrice);\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n game.paymentsBalance += _RInstance.joinGamePrice;\n }\n gameId.addPlayer(player);\n }\n\n /**\n * @dev Closes the game with the given ID and transfers the game's balance to the beneficiary. `gameId` is the ID of the game. `beneficiary` is the address to transfer the game's balance to. `playersGameEndedCallback` is a callback function to call for each player when the game ends.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - Emits rank rewards for the game.\n * - Removes and unlocks each player from the game.\n * - Calls `playersGameEndedCallback` for each player.\n * - Transfers the game's balance to `beneficiary`.\n *\n * Returns:\n *\n * - The final scores of the game.\n */\n function closeGame(\n uint256 gameId,\n address beneficiary,\n function(uint256, address) playersGameEndedCallback\n ) internal returns (uint256[] memory) {\n enforceGameExists(gameId);\n emitRankRewards(gameId, gameId.getLeaderBoard());\n (, uint256[] memory finalScores) = gameId.getScores();\n address[] memory players = gameId.getPlayers();\n for (uint256 i = 0; i < players.length; i++) {\n removeAndUnlockPlayer(gameId, players[i]);\n playersGameEndedCallback(gameId, players[i]);\n }\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = LibRankify.RInstanceStorage();\n IERC20(_RInstance.gamePaymentToken).transfer(\n beneficiary,\n (_RInstance.joinGamePrice * players.length) + _RInstance.gamePrice\n );\n return finalScores;\n }\n\n /**\n * @dev Allows a player to quit a game. `gameId` is the ID of the game. `player` is the address of the player. `slash` is a boolean indicating whether to slash the player's payment refund. `onPlayerLeftCallback` is a callback function to call when the player leaves.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - If the join game price is not 0, transfers a refund to `player` and decreases the game's payments balance by the refund amount.\n * - Removes and unlocks `player` from the game.\n * - Calls `onPlayerLeftCallback` for `player`.\n */\n function quitGame(\n uint256 gameId,\n address player,\n bool slash,\n function(uint256, address) onPlayerLeftCallback\n ) internal {\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n if (_RInstance.joinGamePrice != 0) {\n uint256 divideBy = slash ? 2 : 1;\n uint256 paymentRefund = _RInstance.joinGamePrice / divideBy;\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n game.paymentsBalance -= paymentRefund;\n IERC20(_RInstance.gamePaymentToken).transfer(player, paymentRefund);\n }\n removeAndUnlockPlayer(gameId, player); // this will throw if game has started or doesnt exist\n onPlayerLeftCallback(gameId, player);\n }\n\n /**\n * @dev Cancels the game with the given ID, refunds half of the game's payment to the game creator, and transfers the remaining balance to the beneficiary. `gameId` is the ID of the game. `onPlayerLeftCallback` is a callback function to call for each player when they leave. `beneficiary` is the address to transfer the remaining balance to.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - Calls `quitGame` for each player in the game.\n * - Transfers half of the game's payment to the game creator.\n * - Decreases the game's payments balance by the refund amount.\n * - Transfers the remaining balance of the game to `beneficiary`.\n * - Deletes the game.\n */ function cancelGame(\n uint256 gameId,\n function(uint256, address) onPlayerLeftCallback,\n address beneficiary\n ) internal {\n // Cancel the game for each player\n address[] memory players = gameId.getPlayers();\n for (uint256 i = 0; i < players.length; i++) {\n quitGame(gameId, players[i], false, onPlayerLeftCallback); //this will throw if game has started or doesnt exist\n }\n\n // Refund payment to the game creator\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n IRankifyInstanceCommons.RInstanceSettings storage _RInstance = RInstanceStorage();\n uint256 paymentRefund = _RInstance.gamePrice / 2;\n IERC20(_RInstance.gamePaymentToken).transfer(game.createdBy, paymentRefund);\n game.paymentsBalance -= paymentRefund;\n\n // Transfer remaining payments balance to the beneficiary\n IERC20(_RInstance.gamePaymentToken).transfer(beneficiary, game.paymentsBalance);\n game.paymentsBalance = 0;\n\n // Delete the game\n gameId.deleteGame();\n }\n\n /**\n * @dev Fulfills the rank requirement for a player to join a game. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Modifies:\n *\n * - Locks the rank token(s) of `player` in the rank token contract.\n * - If the game has additional ranks, locks the additional ranks of `player` in the respective rank token contracts.\n */\n function fulfillRankRq(uint256 gameId, address player) internal {\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n if (game.rank > 1) {\n _fulfillRankRq(player, game.rank, settings.rankTokenAddress);\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\n _fulfillRankRq(player, game.rank, game.additionalRanks[i]);\n }\n }\n }\n\n /**\n * @dev Emits rank rewards to the top three addresses in the leaderboard. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard sorted in descendign order. `rankTokenAddress` is the address of the rank token contract.\n *\n * Modifies:\n *\n * - Transfers rank tokens from this contract to the top three addresses in the leaderboard.\n */\n function emitRankReward(uint256 gameId, address[] memory leaderboard, address rankTokenAddress) private {\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n IRankToken rankTokenContract = IRankToken(rankTokenAddress);\n rankTokenContract.safeTransferFrom(address(this), leaderboard[0], game.rank + 1, 1, \"\");\n rankTokenContract.safeTransferFrom(address(this), leaderboard[1], game.rank, 2, \"\");\n rankTokenContract.safeTransferFrom(address(this), leaderboard[2], game.rank, 1, \"\");\n }\n\n /**\n * @dev Emits rank rewards to the top addresses in the leaderboard for each rank in the game. `gameId` is the ID of the game. `leaderboard` is an array of addresses representing the leaderboard.\n *\n * Modifies:\n *\n * - Calls `emitRankReward` for the main rank and each additional rank in the game.\n */\n function emitRankRewards(uint256 gameId, address[] memory leaderboard) internal {\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n IRankifyInstanceCommons.RInstanceSettings storage settings = LibRankify.RInstanceStorage();\n emitRankReward(gameId, leaderboard, settings.rankTokenAddress);\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\n emitRankReward(gameId, leaderboard, game.additionalRanks[i]);\n }\n }\n\n /**\n * @dev Releases a rank token for a player with a specific game rank. `player` is the address of the player. `gameRank` is the game rank of the player. `rankTokenAddress` is the address of the rank token contract.\n *\n * Modifies:\n *\n * - Unlocks one rank token of `gameRank` for `player` in the rank token contract.\n */\n function _releaseRankToken(address player, uint256 gameRank, address rankTokenAddress) private {\n IRankToken rankToken = IRankToken(rankTokenAddress);\n rankToken.unlock(player, gameRank, 1);\n }\n\n /**\n * @dev Removes a player from a game and unlocks their rank tokens. `gameId` is the ID of the game. `player` is the address of the player to be removed.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - Removes `player` from the game.\n * - If the game rank is greater than 1, unlocks the game rank token for `player` in the rank token contract and unlocks each additional rank token for `player` in the respective rank token contracts.\n */\n function removeAndUnlockPlayer(uint256 gameId, address player) internal {\n enforceGameExists(gameId);\n gameId.removePlayer(player); //This will throw if game is in the process\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n if (game.rank > 1) {\n _releaseRankToken(player, game.rank, settings.rankTokenAddress);\n for (uint256 i = 0; i < game.additionalRanks.length; i++) {\n _releaseRankToken(player, game.rank, game.additionalRanks[i]);\n }\n }\n }\n\n /**\n * @dev Tries to make a move for a player in a game. `gameId` is the ID of the game. `player` is the address of the player.\n * The \"move\" is considered to be a state when player has made all actions he could in the given turn.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - If the player has not voted and a vote is expected, or if the player has not made a proposal and a proposal is expected, does not make a move and returns `false`.\n * - Otherwise, makes a move for `player` and returns `true`.\n */\n function tryPlayerMove(uint256 gameId, address player) internal returns (bool) {\n uint256 turn = gameId.getTurn();\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n bool expectVote = true;\n bool expectProposal = true;\n if (turn == 1) expectVote = false; //Dont expect votes at firt turn\n // else if (gameId.isLastTurn()) expectProposal = false; // For now easiest solution is to keep collecting proposals as that is less complicated boundry case\n if (game.numPrevProposals < settings.voting.minQuadraticPositons) expectVote = false; // If there is not enough proposals then round is skipped votes cannot be filled\n bool madeMove = true;\n if (expectVote && !game.playerVoted[player]) madeMove = false;\n if (expectProposal && game.proposalCommitmentHashes[player] == \"\") madeMove = false;\n if (madeMove) gameId.playerMove(player);\n return madeMove;\n }\n\n /**\n * @dev Calculates the scores using a quadratic formula based on the revealed votes and proposer indices. `gameId` is the ID of the game. `votesRevealed` is an array of revealed votes. `proposerIndicies` is an array of proposer indices that links proposals to index in getPlayers().\n *\n * Returns:\n *\n * - An array of updated scores for each player.\n * - An array of scores calculated for the current round.\n */\n function calculateScoresQuadratic(\n uint256 gameId,\n uint256[][] memory votesRevealed,\n uint256[] memory proposerIndicies\n ) internal returns (uint256[] memory, uint256[] memory) {\n address[] memory players = gameId.getPlayers();\n uint256[] memory scores = new uint256[](players.length);\n uint256[] memory roundScores = new uint256[](players.length);\n bool[] memory playerVoted = new bool[](players.length);\n IRankifyInstanceCommons.RInstanceSettings storage settings = RInstanceStorage();\n IRankifyInstanceCommons.RInstance storage game = getGameStorage(gameId);\n // Convert mappiing to array to pass it to libQuadratic\n for (uint256 i = 0; i < players.length; i++) {\n playerVoted[i] = game.playerVoted[players[i]];\n }\n roundScores = settings.voting.computeScoresByVPIndex(\n votesRevealed,\n playerVoted,\n settings.voting.maxQuadraticPoints,\n proposerIndicies.length\n );\n for (uint256 playerIdx = 0; playerIdx < players.length; playerIdx++) {\n //for each player\n if (proposerIndicies[playerIdx] < players.length) {\n //if player proposal exists\n scores[playerIdx] = gameId.getScore(players[playerIdx]) + roundScores[playerIdx];\n gameId.setScore(players[playerIdx], scores[playerIdx]);\n } else {\n //Player did not propose\n }\n }\n return (scores, roundScores);\n }\n}\n" + }, + "src/libraries/LibReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\n// import \"./LibDiamondOwner.sol\";\n// import { IMultipass } from \"../interfaces/sol\";\nimport \"hardhat/console.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\nlibrary LibReentrancyGuard {\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\"reentrancyguard.storage.position\");\n\n struct ReentrancyGuardStruct {\n bool _entered;\n }\n\n function reentrancyGuardStorage() internal pure returns (ReentrancyGuardStruct storage ds) {\n bytes32 position = TBG_STORAGE_POSITION;\n assembly {\n ds.slot := position\n }\n }\n}\n" + }, + "src/libraries/LibTurnBasedGame.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport \"hardhat/console.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\n// import {EnumerableMap} from \"@openzeppelin/contracts/utils/structs/EnumerableMap.sol\";\nimport {EnumerableSet} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {LibArray} from \"../libraries/LibArray.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\n/**\n * @title LibTBG\n * @dev Library for managing turn-based games.\n * It is designed to be used as a base library for games, and provides the following functionality:\n * - setting game settings such as time per turn, max players, min players, etc as well as perform score and leaderboard tracking\n *\n * Limitations:\n * - It is assumed there is only one game per player\n * - It is assumed there is only on game master per game\n *\n * ***WARNING*** Some limitations:\n * - This library is still under development and its interfaces may change.\n * - getting game data (which has own storage assigement and can be encapsulated from library) however there is no storage slot collision checks in place\n *\n */\nlibrary LibTBG {\n using EnumerableSet for EnumerableSet.AddressSet;\n\n struct GameSettings {\n uint256 timePerTurn;\n uint256 maxPlayersSize;\n uint256 minPlayersSize;\n uint256 timeToJoin;\n uint256 maxTurns;\n uint256 numWinners;\n uint256 voteCredits;\n string subject;\n }\n\n struct GameInstance {\n address gameMaster;\n uint256 currentTurn;\n uint256 turnStartedAt;\n uint256 registrationOpenAt;\n bool hasStarted;\n bool hasEnded;\n EnumerableSet.AddressSet players;\n mapping(address => bool) madeMove;\n uint256 numPlayersMadeMove;\n mapping(address => uint256) score;\n bytes32 implemenationStoragePointer;\n bool isOvertime;\n address[] leaderboard;\n }\n\n struct TBGStorageStruct {\n GameSettings settings;\n mapping(uint256 => GameInstance) games;\n mapping(address => uint256) playerInGame;\n uint256 totalGamesCreated;\n }\n\n bytes32 constant TBG_STORAGE_POSITION = keccak256(\"turnbasedgame.storage.position\");\n bytes32 constant IMPLEMENTATION_STORAGE_POSITION = keccak256(\"implementation.turnbasedgame.storage.position\");\n\n function TBGStorage() internal pure returns (TBGStorageStruct storage es) {\n bytes32 position = TBG_STORAGE_POSITION;\n assembly {\n es.slot := position\n }\n }\n\n function _getGame(uint256 gameId) internal view returns (GameInstance storage) {\n TBGStorageStruct storage tbg = TBGStorage();\n return tbg.games[gameId];\n }\n\n /**\n * @dev Initializes the game with the provided settings. `settings` is the settings for the game.\n *\n * Requirements:\n *\n * - `settings.timePerTurn` must not be zero.\n * - `settings.maxPlayersSize` must not be zero.\n * - `settings.minPlayersSize` must be at least 2.\n * - `settings.maxTurns` must not be zero.\n * - `settings.numWinners` must not be zero and must be less than `settings.minPlayersSize`.\n * - `settings.timeToJoin` must not be zero.\n * - `settings.maxPlayersSize` must not be less than `settings.minPlayersSize`.\n * - `settings.subject` must not be an empty string.\n *\n * Modifies:\n *\n * - Sets the settings of the game to `settings`.\n */\n function init(GameSettings memory settings) internal {\n TBGStorageStruct storage tbg = TBGStorage();\n if (settings.timePerTurn == 0) require(false, \"settings.timePerTurn\"); // revert invalidConfiguration('timePerTurn');\n if (settings.maxPlayersSize == 0) require(false, \"settings.maxPlayersSize\"); // revert invalidConfiguration('maxPlayersSize');\n if (settings.minPlayersSize < 2) require(false, \"settings.minPlayersSize\"); //revert invalidConfiguration('minPlayersSize');\n if (settings.maxTurns == 0) require(false, \"settings.maxTurns\"); //revert invalidConfiguration('maxTurns');\n if (settings.numWinners == 0 || settings.numWinners >= settings.minPlayersSize) require(false, \"numWinners\"); //revert invalidConfiguration('numWinners');\n if (settings.timeToJoin == 0) require(false, \"timeToJoin\"); // revert invalidConfiguration('timeToJoin');\n if (settings.maxPlayersSize < settings.minPlayersSize) require(false, \"maxPlayersSize\"); //revert invalidConfiguration('maxPlayersSize');\n if (bytes(settings.subject).length == 0) require(false, \"subject length\"); //revert invalidConfiguration('subject length');\n\n tbg.settings = settings;\n }\n\n /**\n * @dev Creates a new game with the provided game ID and game master. `gameId` is the ID of the game. `gm` is the address of the game master.\n *\n * Requirements:\n *\n * - The game with `gameId` must not already exist.\n * - `gm` must not be the zero address.\n * - `gameId` must not be zero.\n * - The game master of the game with `gameId` must be the zero address.\n *\n * Modifies:\n *\n * - Sets the game master of the game with `gameId` to `gm`.\n * - Increments the total number of games created.\n */\n function createGame(uint256 gameId, address gm) internal {\n TBGStorageStruct storage tbg = TBGStorage();\n require(!gameExists(gameId), \"createGame->Already exists\");\n require(gm != address(0), \"createGame->GM\");\n require(gameId != 0, \"createGame->gameId\");\n require(tbg.games[gameId].gameMaster == address(0), \"createGame->gameId\");\n tbg.games[gameId].gameMaster = gm;\n tbg.totalGamesCreated += 1;\n\n //totalGamesCreated ensures nonce-like behaviur:\n //even if game would get deleted and re-created with same name, data storage would be different\n tbg.games[gameId].implemenationStoragePointer = keccak256(\n abi.encode(gameId, tbg.totalGamesCreated, TBG_STORAGE_POSITION)\n );\n }\n\n /**\n * @dev Deletes a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - Sets the game master, current turn, hasEnded, hasStarted,\n * implementationStoragePointer, isOvertime, leaderboard, numPlayersMadeMove,\n * players, registrationOpenAt, and turnStartedAt of the game with `gameId`\n * to their initial values.\n * - Sets the score and madeMove of each player in the game with `gameId`\n * to their initial values.\n */\n function deleteGame(uint256 gameId) internal {\n TBGStorageStruct storage tbg = TBGStorage();\n GameInstance storage _game = _getGame(gameId);\n address[] memory players = _game.players.values();\n for (uint256 i = 0; i < players.length; i++) {\n tbg.games[gameId].score[players[i]] = 0;\n tbg.games[gameId].madeMove[players[i]] = false;\n }\n delete tbg.games[gameId].gameMaster;\n delete tbg.games[gameId].currentTurn;\n delete tbg.games[gameId].hasEnded;\n delete tbg.games[gameId].hasStarted;\n delete tbg.games[gameId].implemenationStoragePointer;\n delete tbg.games[gameId].isOvertime;\n delete tbg.games[gameId].leaderboard;\n delete tbg.games[gameId].numPlayersMadeMove;\n delete tbg.games[gameId].players;\n delete tbg.games[gameId].registrationOpenAt;\n delete tbg.games[gameId].turnStartedAt;\n }\n\n /**\n * @dev Checks if a game with the provided game ID can be joined. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game can be joined.\n */\n function canBeJoined(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n if (_game.hasStarted || _game.registrationOpenAt == 0) return false;\n return true;\n }\n\n /**\n * @dev Adds a player to a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - `participant` must not already be in a game.\n * - The number of players in the game with `gameId` must be less than the maximum number of players.\n * - The game with `gameId` must be joinable.\n *\n * Modifies:\n *\n * - Adds `participant` to the players of the game with `gameId`.\n * - Sets the madeMove of `participant` in the game with `gameId` to false.\n * - Sets the game of `participant` to `gameId`.\n */\n function addPlayer(uint256 gameId, address participant) internal {\n TBGStorageStruct storage tbg = TBGStorage();\n require(gameExists(gameId), \"addPlayer->invalid game\");\n\n require(tbg.playerInGame[participant] == 0, \"addPlayer->Player in game\");\n GameInstance storage _game = _getGame(gameId);\n require(_game.players.length() < tbg.settings.maxPlayersSize, \"addPlayer->party full\");\n\n require(canBeJoined(gameId), \"addPlayer->cant join now\");\n _game.players.add(participant);\n _game.madeMove[participant] = false;\n tbg.playerInGame[participant] = gameId;\n }\n\n /**\n * @dev Checks if a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Returns:\n *\n * - A boolean indicating whether the player is in the game.\n */\n function isPlayerInGame(uint256 gameId, address player) internal view returns (bool) {\n TBGStorageStruct storage tbg = TBGStorage();\n return tbg.playerInGame[player] == gameId ? true : false;\n }\n\n /**\n * @dev Removes a player from a game with the provided game ID. `gameId` is the ID of the game. `participant` is the address of the player.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - `participant` must be in the game with `gameId`.\n * - The game with `gameId` must not have started or must have ended.\n *\n * Modifies:\n *\n * - Sets the game of `participant` to 0.\n * - Removes `participant` from the players of the game with `gameId`.\n */\n function removePlayer(uint256 gameId, address participant) internal {\n TBGStorageStruct storage tbg = TBGStorage();\n GameInstance storage _game = _getGame(gameId);\n require(gameExists(gameId), \"game does not exist\");\n require(tbg.playerInGame[participant] == gameId, \"Not in the game\");\n require(_game.hasStarted == false || _game.hasEnded == true, \"Cannot leave once started\");\n tbg.playerInGame[participant] = 0;\n _game.players.remove(participant);\n }\n\n /**\n * @dev Checks if the current turn in a game with the provided game ID has timed out. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - `gameId` must not be zero.\n * - The game with `gameId` must have started.\n *\n * Returns:\n *\n * - A boolean indicating whether the current turn has timed out.\n */\n function isTurnTimedOut(uint256 gameId) internal view returns (bool) {\n TBGStorageStruct storage tbg = TBGStorage();\n GameInstance storage _game = _getGame(gameId);\n assert(gameId != 0);\n assert(_game.hasStarted == true);\n if (block.timestamp <= tbg.settings.timePerTurn + _game.turnStartedAt) return false;\n return true;\n }\n\n /**\n * @dev Checks if a game with the provided game ID exists. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game exists.\n */\n function gameExists(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n if (_game.gameMaster != address(0)) return true;\n return false;\n }\n\n /**\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - `gameId` must not be zero.\n * - The game with `gameId` must have started.\n */\n function enforceHasStarted(uint256 gameId) internal view {\n GameInstance storage _game = _getGame(gameId);\n assert(gameId != 0);\n require(_game.hasStarted, \"Game has not yet started\");\n }\n\n /**\n * @dev Enforces that a game with the provided game ID has started. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - `gameId` must not be zero.\n * - The game with `gameId` must have started.\n *\n */\n function canEndTurn(uint256 gameId) internal view returns (bool) {\n bool turnTimedOut = isTurnTimedOut(gameId);\n GameInstance storage _game = _getGame(gameId);\n if (!_game.hasStarted || isGameOver(gameId)) return false;\n if (turnTimedOut) return true;\n return false;\n }\n\n /**\n * @dev Checks if the current turn in a game with the provided game ID can end early. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the current turn can end early.\n */\n function canEndTurnEarly(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n bool everyoneMadeMove = (_game.numPlayersMadeMove) == _game.players.length() ? true : false;\n if (!_game.hasStarted || isGameOver(gameId)) return false;\n if (everyoneMadeMove || canEndTurn(gameId)) return true;\n return false;\n }\n\n /**\n * @dev Modifier that requires the current turn in a game with the provided game ID to be able to end. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The current turn in the game with `gameId` must be able to end.\n */\n modifier onlyInTurnTime(uint256 gameId) {\n require(isTurnTimedOut(gameId) == false, \"onlyInTurnTime -> turn timedout\");\n _;\n }\n\n modifier onlyWhenTurnCanEnd(uint256 gameId) {\n require(canEndTurn(gameId) == true, \"onlyWhenTurnCanEnd: Not everyone made a move yet and there still is time\");\n _;\n }\n\n /**\n * @dev Clears the current moves in a game. `game` is the game.\n *\n * Modifies:\n *\n * - Sets the madeMove of each player in `game` to false.\n */\n function _clearCurrentMoves(GameInstance storage game) internal {\n for (uint256 i = 0; i < game.players.length(); i++) {\n address player = game.players.at(i);\n game.madeMove[player] = false;\n }\n game.numPlayersMadeMove = 0;\n }\n\n /**\n * @dev Resets the states of the players in a game. `game` is the game.\n *\n * Modifies:\n *\n * - Sets the madeMove and score of each player in `game` to their initial values.\n */\n function _resetPlayerStates(GameInstance storage game) internal {\n for (uint256 i = 0; i < game.players.length(); i++) {\n address player = game.players.at(i);\n game.madeMove[player] = false;\n game.score[player] = 0;\n }\n }\n\n /**\n * @dev Sets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player. `value` is the score.\n *\n * Requirements:\n *\n * - `player` must be in the game with `gameId`.\n *\n * Modifies:\n *\n * - Sets the score of `player` in the game with `gameId` to `value`.\n */\n function setScore(uint256 gameId, address player, uint256 value) internal {\n GameInstance storage _game = _getGame(gameId);\n require(isPlayerInGame(gameId, player), \"player not in a game\");\n _game.score[player] = value;\n }\n\n /**\n * @dev Gets the score of a player in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Returns:\n *\n * - The score of `player` in the game with `gameId`.\n */\n function getScore(uint256 gameId, address player) internal view returns (uint256) {\n GameInstance storage _game = _getGame(gameId);\n return _game.score[player];\n }\n\n /**\n * @dev Gets the scores of the players in a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - An array of the addresses of the players in the game with `gameId`.\n * - An array of the scores of the players in the game with `gameId`.\n */\n function getScores(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\n address[] memory players = getPlayers(gameId);\n uint256[] memory scores = new uint256[](players.length);\n for (uint256 i = 0; i < players.length; i++) {\n scores[i] = getScore(gameId, players[i]);\n }\n return (players, scores);\n }\n\n /**\n * @dev Opens registration for a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n *\n * Modifies:\n *\n * - Sets the registrationOpenAt of the game with `gameId` to the current block timestamp.\n */\n function openRegistration(uint256 gameId) internal {\n require(gameExists(gameId), \"game not found\");\n GameInstance storage _game = _getGame(gameId);\n _game.registrationOpenAt = block.timestamp;\n }\n\n /**\n * @dev Checks if registration is open for a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether registration is open for the game.\n */\n function isRegistrationOpen(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n TBGStorageStruct storage tbg = TBGStorage();\n if (_game.registrationOpenAt == 0) {\n return false;\n } else {\n return _game.registrationOpenAt < block.timestamp + tbg.settings.timeToJoin ? true : false;\n }\n }\n\n /**\n * @dev Checks if a game with the provided game ID can start. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game can start.\n */\n function canStart(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n TBGStorageStruct storage tbg = TBGStorage();\n if (_game.hasStarted) return false;\n if (_game.registrationOpenAt == 0) return false;\n if (gameId == 0) return false;\n if (block.timestamp <= _game.registrationOpenAt + tbg.settings.timeToJoin) return false;\n if (_game.players.length() < tbg.settings.minPlayersSize) return false;\n return true;\n }\n\n /**\n * @dev Checks if a game with the provided game ID can start early. `gameId` is the ID of the game.\n * By \"early\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\n *\n * Returns:\n *\n * - A boolean indicating whether the game can start early.\n */\n function canStartEarly(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n TBGStorageStruct storage tbg = TBGStorage();\n\n if ((_game.players.length() == tbg.settings.maxPlayersSize) || canStart(gameId)) return true;\n return false;\n }\n\n /**\n * @dev Starts a game with the provided game ID early. `gameId` is the ID of the game.\n * By \"early\" it is assumed that time to join has not yet passed, but it's already cap players limit reached.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - The game with `gameId` must not have started.\n * - The game with `gameId` must have opened registration.\n * - The number of players in the game with `gameId` must be greater than or equal to the minimum number of players.\n * - The number of players in the game with `gameId` must be equal to the maximum number of players or the current block timestamp must be greater than the registration open time plus the time to join.\n *\n * Modifies:\n *\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\n * - Resets the states of the players in the game with `gameId`.\n */\n function startGameEarly(uint256 gameId) internal {\n GameInstance storage _game = _getGame(gameId);\n TBGStorageStruct storage tbg = TBGStorage();\n require(_game.hasStarted == false, \"startGame->already started\");\n require(_game.registrationOpenAt != 0, \"startGame->Game registration was not yet open\");\n require(gameId != 0, \"startGame->Game not found\");\n require(_game.players.length() >= tbg.settings.minPlayersSize, \"startGame->Not enough players\");\n require(\n (_game.players.length() == tbg.settings.maxPlayersSize) ||\n (block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin),\n \"startGame->Not enough players\"\n );\n _game.hasStarted = true;\n _game.hasEnded = false;\n _game.currentTurn = 1;\n _game.turnStartedAt = block.timestamp;\n _resetPlayerStates(_game);\n }\n\n /**\n * @dev Starts a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must exist.\n * - The game with `gameId` must not have started.\n * - The game with `gameId` must have opened registration.\n * - The current block timestamp must be greater than the registration open time plus the time to join.\n *\n * Modifies:\n *\n * - Sets the hasStarted, hasEnded, currentTurn, and turnStartedAt of the game with `gameId` to their new values.\n * - Resets the states of the players in the game with `gameId`.\n */\n function startGame(uint256 gameId) internal {\n GameInstance storage _game = _getGame(gameId);\n TBGStorageStruct storage tbg = TBGStorage();\n require(_game.hasStarted == false, \"startGame->already started\");\n require(_game.registrationOpenAt != 0, \"startGame->Game registration was not yet open\");\n require(block.timestamp > _game.registrationOpenAt + tbg.settings.timeToJoin, \"startGame->Still Can Join\");\n require(gameId != 0, \"startGame->Game not found\");\n require(_game.players.length() >= tbg.settings.minPlayersSize, \"startGame->Not enough players\");\n _game.hasStarted = true;\n _game.hasEnded = false;\n _game.currentTurn = 1;\n _game.turnStartedAt = block.timestamp;\n _resetPlayerStates(_game);\n }\n\n /**\n * @dev Gets the current turn of a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - The current turn of the game with `gameId`.\n */\n function getTurn(uint256 gameId) internal view returns (uint256) {\n GameInstance storage _game = _getGame(gameId);\n return _game.currentTurn;\n }\n\n /**\n * @dev Gets the game master of a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - The game master of the game with `gameId`.\n */\n function getGM(uint256 gameId) internal view returns (address) {\n GameInstance storage _game = _getGame(gameId);\n return _game.gameMaster;\n }\n\n /**\n * @dev Checks if the current turn is the last turn in a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the current turn is the last turn in the game.\n */\n function isLastTurn(uint256 gameId) internal view returns (bool) {\n TBGStorageStruct storage tbg = TBGStorage();\n GameInstance storage _game = _getGame(gameId);\n if (_game.currentTurn == tbg.settings.maxTurns) return true;\n else return false;\n }\n\n /**\n * @dev Checks if a game with the provided game ID is over. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game is over.\n */\n function isGameOver(uint256 gameId) internal view returns (bool) {\n TBGStorageStruct storage tbg = TBGStorage();\n GameInstance storage _game = _getGame(gameId);\n if ((_game.currentTurn > tbg.settings.maxTurns) && !_game.isOvertime) return true;\n else return false;\n }\n\n /**\n * @dev Enforces that a game with the provided game ID is not over. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must not be over.\n */\n function enforceIsNotOver(uint256 gameId) internal view {\n require(!isGameOver(gameId), \"Game over\");\n }\n\n /**\n * @dev Records a player's move in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Requirements:\n *\n * - The game with `gameId` must have started.\n * - The game with `gameId` must not be over.\n * - `player` must not have made a move in the current turn of the game with `gameId`.\n * - `player` must be in the game with `gameId`.\n *\n * Modifies:\n *\n * - Sets the madeMove of `player` in the game with `gameId` to true.\n * - Increments the numPlayersMadeMove of the game with `gameId`.\n */\n function playerMove(uint256 gameId, address player) internal onlyInTurnTime(gameId) {\n GameInstance storage _game = _getGame(gameId);\n enforceHasStarted(gameId);\n enforceIsNotOver(gameId);\n require(_game.madeMove[player] == false, \"already made a move\");\n TBGStorageStruct storage tbg = TBGStorage();\n require(gameId == tbg.playerInGame[player], \"is not in the game\");\n _game.madeMove[player] = true;\n _game.numPlayersMadeMove += 1;\n }\n\n /**\n * @dev Enforces that a player is in a game with the provided game ID. `gameId` is the ID of the game. `player` is the address of the player.\n *\n * Requirements:\n *\n * - `player` must be in the game with `gameId`.\n */\n function enforceIsPlayingGame(uint256 gameId, address player) internal view {\n TBGStorageStruct storage tbg = TBGStorage();\n require(gameId == tbg.playerInGame[player], \"is not in the game\");\n }\n\n /**\n * @dev Checks if a game with the provided game ID has started. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game has started.\n */\n function hasStarted(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n return _game.hasStarted;\n }\n\n /**\n * @dev Gets the leaderboard of a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\n */\n function getLeaderBoard(uint256 gameId) internal view returns (address[] memory) {\n GameInstance storage _game = _getGame(gameId);\n return _game.leaderboard;\n }\n\n /**\n * @dev Advances to the next turn in a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - The game with `gameId` must be able to end the current turn early. (all players have moved or the turn has timed out)\n *\n * Modifies:\n *\n * - Clears the current moves in the game with `gameId`.\n * - Increments the currentTurn of the game with `gameId`.\n * - Sets the turnStartedAt of the game with `gameId` to the current block timestamp.\n * - If the current turn is the last turn or the game with `gameId` is in overtime, checks if the game is a tie and sets the isOvertime of the game with `gameId` to the result.\n * - Sets the hasEnded of the game with `gameId` to whether the game is over.\n *\n * Returns:\n *\n * - A boolean indicating whether the current turn is the last turn.\n * - A boolean indicating whether the game is a tie.\n * - A boolean indicating whether the game is over.\n */\n function nextTurn(uint256 gameId) internal returns (bool, bool, bool) {\n require(canEndTurnEarly(gameId), \"nextTurn->CanEndEarly\");\n GameInstance storage _game = _getGame(gameId);\n _clearCurrentMoves(_game);\n _game.currentTurn += 1;\n _game.turnStartedAt = block.timestamp;\n bool _isLastTurn = isLastTurn(gameId);\n if (_isLastTurn || _game.isOvertime) {\n bool _isTie = isTie(gameId);\n _game.isOvertime = _isTie;\n }\n _game.hasEnded = isGameOver(gameId);\n\n (_game.leaderboard, ) = sortByScore(gameId);\n return (_isLastTurn, _game.isOvertime, _game.hasEnded);\n }\n\n /**\n * @dev Gets the data storage pointer.\n *\n * Returns:\n *\n * - The data storage pointer.\n */\n function getDataStorage() internal pure returns (bytes32 pointer) {\n return IMPLEMENTATION_STORAGE_POSITION;\n }\n\n /**\n * @dev Gets the game data storage pointer of a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - The game data storage pointer of the game with `gameId`.\n */\n function getGameDataStorage(uint256 gameId) internal view returns (bytes32 pointer) {\n GameInstance storage _game = _getGame(gameId);\n return _game.implemenationStoragePointer;\n }\n\n /**\n * @dev Gets the number of players in a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - The number of players in the game with `gameId`.\n */\n function getPlayersNumber(uint256 gameId) internal view returns (uint256) {\n GameInstance storage _game = _getGame(gameId);\n return _game.players.length();\n }\n\n /**\n * @dev Gets the players in a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - An array of the addresses of the players in the game with `gameId`.\n */\n function getPlayers(uint256 gameId) internal view returns (address[] memory) {\n GameInstance storage _game = _getGame(gameId);\n return _game.players.values();\n }\n\n /**\n * @dev Gets the game settings.\n *\n * Returns:\n *\n * - The game settings.\n */\n function getGameSettings() internal view returns (GameSettings memory) {\n TBGStorageStruct storage tbg = TBGStorage();\n return tbg.settings;\n }\n\n /**\n * @dev Enforces that a game with the provided game ID is in the pre-registration stage. `gameId` is the ID of the game.\n *\n * Requirements:\n *\n * - Registration must not be open for the game with `gameId`.\n * - The game with `gameId` must not have started.\n */\n function enforceIsPreRegistrationStage(uint256 gameId) internal view {\n require(!isRegistrationOpen(gameId), \"Cannot do when registration is open\");\n require(!hasStarted(gameId), \"Cannot do when game started\");\n }\n\n /**\n * @dev Adds overtime to a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Modifies:\n *\n * - Sets the isOvertime of the game with `gameId` to true.\n */\n function addOvertime(uint256 gameId) internal {\n GameInstance storage _game = _getGame(gameId);\n _game.isOvertime = true;\n }\n\n /**\n * @dev Checks if a game with the provided game ID is in overtime. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - A boolean indicating whether the game is in overtime.\n */\n function isOvertime(uint256 gameId) internal view returns (bool) {\n GameInstance storage _game = _getGame(gameId);\n return _game.isOvertime;\n }\n\n /**\n * @dev Resets the overtime of a game with the provided game ID. `gameId` is the ID of the game.\n *\n * Modifies:\n *\n * - Sets the isOvertime of the game with `gameId` to false.\n */\n function resetOvertime(uint256 gameId) internal {\n GameInstance storage _game = _getGame(gameId);\n _game.isOvertime = false;\n }\n\n /**\n * @dev Checks if a game with the provided game ID is a tie. `gameId` is the ID of the game.\n * Tie being defined as at least two of the top `numWinners` players having the same score.\n *\n * Returns:\n *\n * - A boolean indicating whether the game is a tie.\n */\n function isTie(uint256 gameId) internal view returns (bool) {\n TBGStorageStruct storage tbg = TBGStorage();\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\n\n LibArray.quickSort(scores, int256(0), int256(scores.length - 1));\n for (uint256 i = 0; i < players.length - 1; i++) {\n if ((i <= tbg.settings.numWinners - 1)) {\n if (scores[i] == scores[i + 1]) {\n return (true);\n }\n } else {\n break;\n }\n }\n return (false);\n }\n\n /**\n * @dev Gets the game ID of the game a player is in. `player` is the address of the player.\n *\n * Returns:\n *\n * - The game ID of the game `player` is in.\n */\n function getPlayersGame(address player) internal view returns (uint256) {\n TBGStorageStruct storage tbg = TBGStorage();\n\n return tbg.playerInGame[player];\n }\n\n /**\n * @dev Sorts the players and scores arrays in descending order of scores using the quicksort algorithm. `players` is the array of player addresses. `scores` is the array of scores. `left` is the left index. `right` is the right index.\n *\n * Modifies:\n *\n * - Sorts the `players` and `scores` arrays in place.\n */\n function _quickSort(address[] memory players, uint256[] memory scores, int256 left, int256 right) private view {\n int256 i = left;\n int256 j = right;\n if (i == j) return;\n uint256 pivot = scores[uint256(left + (right - left) / 2)];\n while (i <= j) {\n while (scores[uint256(i)] > pivot) i++;\n while (pivot > scores[uint256(j)]) j--;\n if (i <= j) {\n (scores[uint256(i)], scores[uint256(j)]) = (scores[uint256(j)], scores[uint256(i)]);\n (players[uint256(i)], players[uint256(j)]) = (players[uint256(j)], players[uint256(i)]);\n i++;\n j--;\n }\n }\n if (left < j) _quickSort(players, scores, left, j);\n if (i < right) _quickSort(players, scores, i, right);\n }\n\n /**\n * @dev Sorts the players in a game with the provided game ID by score in descending order. `gameId` is the ID of the game.\n *\n * Returns:\n *\n * - An array of the addresses of the players in the game with `gameId`, sorted by score.\n * - An array of the scores of the players in the game with `gameId`, sorted in descending order.\n */\n function sortByScore(uint256 gameId) internal view returns (address[] memory, uint256[] memory) {\n (address[] memory players, uint256[] memory scores) = getScores(gameId);\n _quickSort(players, scores, 0, int256(scores.length - 1));\n return (players, scores);\n }\n}\n" + }, + "src/mocks/MockERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\npragma solidity ^0.8.20;\n\ncontract MockERC20 is ERC20Burnable, Ownable {\n uint256 numTokens;\n\n constructor(string memory name_, string memory symbol_, address owner) ERC20(name_, symbol_) {\n require(owner != address(0), \"must specify owner of the contract\");\n transferOwnership(owner);\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n require(to != address(0), \"MockERC20->mint: Address not specified\");\n require(amount != 0, \"MockERC20->mint: amount not specified\");\n _mint(to, amount);\n }\n}\n" + }, + "src/modifiers/OnlyOwnerDiamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\nimport \"../vendor/libraries/LibDiamond.sol\";\n\n// import \"./interfaces/IERC173.sol\";\n\ncontract OnlyOwnerDiamond {\n modifier onlyOwner() {\n LibDiamond.enforceIsContractOwner();\n _;\n }\n}\n" + }, + "src/tokens/RankToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IRankToken} from \"../interfaces/IRankToken.sol\";\nimport \"../abstracts/CompositeERC1155.sol\";\nimport \"hardhat/console.sol\";\npragma solidity ^0.8.20;\n\ncontract RankToken is CompositeERC1155, Ownable, IRankToken {\n string private _contractURI;\n mapping(address => uint256) public rank;\n uint256 public topRank;\n address private _rankingInstance;\n uint256 _levelUpThreshold;\n\n modifier onlyRankingInstance() {\n require(msg.sender == _rankingInstance, \"only ranking contract can do that\");\n _;\n }\n\n constructor(\n string memory uri_,\n address owner_,\n string memory cURI,\n uint256 levelUpThreshold,\n address[] memory components,\n uint256[] memory componentWeights\n ) CompositeERC1155(uri_, components, componentWeights) {\n require(owner_ != address(0), \"must specify owner of the contract\");\n _contractURI = cURI;\n _levelUpThreshold = levelUpThreshold;\n transferOwnership(owner_);\n }\n\n function getRankingInstance() public view returns (address) {\n return _rankingInstance;\n }\n\n function contractURI() public view returns (string memory) {\n return _contractURI;\n }\n\n function setURI(string memory uri_) public onlyOwner {\n _setURI(uri_);\n }\n\n function setContractURI(string memory uri_) public onlyOwner {\n _contractURI = uri_;\n }\n\n event Leader(address indexed account, uint256 indexed rank);\n\n function _mintRank(address to, uint256 amount, uint256 level, bytes memory data) private {\n require(to != address(0), \"RankToken->mint: Address not specified\");\n require(amount != 0, \"RankToken->mint: amount not specified\");\n require(level != 0, \"RankToken->mint: pool id not specified\");\n if (level > topRank) {\n topRank = level;\n emit Leader(to, level);\n }\n _mint(to, level, amount, data);\n }\n\n function mint(address to, uint256 amount, uint256 level, bytes memory data) public onlyRankingInstance {\n _mintRank(to, amount, level, data);\n }\n\n function updateRankingInstance(address newRankingInstance) public onlyOwner {\n require(newRankingInstance != address(0), \"must specify ranking instance\");\n _rankingInstance = newRankingInstance;\n emit RankingInstanceUpdated(newRankingInstance);\n }\n\n function lock(\n address account,\n uint256 id,\n uint256 amount\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\n super.lock(account, id, amount);\n }\n\n function unlock(\n address account,\n uint256 id,\n uint256 amount\n ) public override(LockableERC1155, ILockableERC1155) onlyRankingInstance {\n super.unlock(account, id, amount);\n }\n\n function batchMint(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public onlyRankingInstance {\n require(to != address(0), \"RankToken->mint: Address not specified\");\n require(amounts.length != 0, \"RankToken->mint: amount not specified\");\n require(ids.length != 0, \"RankToken->mint: pool id not specified\");\n _mintBatch(to, ids, amounts, data);\n }\n\n function levelUp(address to, uint256 level, bytes memory data) public {\n require(to == msg.sender || msg.sender == _rankingInstance, \"levelUp: Not permitted\");\n _burn(to, level, _levelUpThreshold);\n _mintRank(to, 1, level, data);\n emit LevelUp(to, level);\n }\n\n function findNewRank(address account, uint256 oldRank) public view returns (uint256) {\n for (uint256 i = oldRank; i > 0; i--) {\n uint256 _balanceTemp = balanceOf(account, i);\n if (_balanceTemp > 0) return i;\n }\n return 0;\n }\n\n event RankUpdated(address indexed account, uint256 indexed rank);\n\n function _afterTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal override {\n for (uint256 i = 0; i < ids.length; i++) {\n if (rank[to] < ids[i] && amounts[i] != 0) {\n rank[to] = ids[i];\n emit RankUpdated(to, ids[i]);\n }\n if (from != address(0) && (rank[from] != findNewRank(from, rank[from]))) {\n uint256 newRankFrom = findNewRank(from, rank[from]);\n rank[from] = newRankFrom;\n emit RankUpdated(from, newRankFrom);\n }\n\n super._afterTokenTransfer(operator, from, to, ids, amounts, data);\n }\n }\n\n //ToDo: Rename in to rankOf(address account)\n function getAccountRank(address account) external view returns (uint256) {\n return rank[account];\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC1155) returns (bool) {\n return interfaceId == type(IRankToken).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/vendor/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\n/******************************************************************************\\\n* Adapted from\n* Author: Nick Mudge (https://twitter.com/mudgen)\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\n/******************************************************************************/\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n /// @param _init The address of the contract or facet to execute _calldata\n /// @param _calldata A function call, including function selector and arguments\n /// _calldata is executed with delegatecall on _init\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\n}\n" + }, + "src/vendor/interfaces/IDiamondLoupe.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\n/******************************************************************************\\\n* Author: Nick Mudge (https://twitter.com/mudgen)\n* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535\n/******************************************************************************/\n\n// A loupe is a small magnifying glass used to look at diamonds.\n// These functions look at diamonds\ninterface IDiamondLoupe {\n /// These functions are expected to be called frequently\n /// by tools.\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /// @notice Gets all facet addresses and their four byte function selectors.\n /// @return facets_ Facet\n function facets() external view returns (Facet[] memory facets_);\n\n /// @notice Gets all the function selectors supported by a specific facet.\n /// @param _facet The facet address.\n /// @return facetFunctionSelectors_\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\n\n /// @notice Get all the facet addresses used by a diamond.\n /// @return facetAddresses_\n function facetAddresses() external view returns (address[] memory facetAddresses_);\n\n /// @notice Gets the facet that supports the given selector.\n /// @dev If facet is not found return address(0).\n /// @param _functionSelector The function selector.\n /// @return facetAddress_ The facet address.\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\n}\n" + }, + "src/vendor/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceId The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "src/vendor/interfaces/IERC173.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\n/// @title ERC-173 Contract Ownership Standard\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\n/* is ERC165 */\ninterface IERC173 {\n /// @dev This emits when ownership of a contract changes.\n // Removed deue to duplicate abi generation in 8.20 compiler\n // event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @notice Get the address of the owner\n /// @return owner_ The address of the owner.\n function owner() external view returns (address owner_);\n\n /// @notice Set the address of the new owner of the contract\n /// @dev Set _newOwner to address(0) to renounce any ownership.\n /// @param _newOwner The address of the new owner of the contract\n function transferOwnership(address _newOwner) external;\n}\n" + }, + "src/vendor/libraries/LibDiamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Adapted from the Diamond 3 reference implementation by Nick Mudge:\n// https://github.com/mudgen/diamond-3-hardhat\n\nimport {IDiamondCut} from \"../interfaces/IDiamondCut.sol\";\n\nlibrary LibDiamond {\n bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\"diamond.standard.diamond.storage\");\n\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\n }\n\n struct DiamondStorage {\n // maps function selector to the facet address and\n // the position of the selector in the facetFunctionSelectors.selectors array\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\n // facet addresses\n address[] facetAddresses;\n // Used to query if a contract implements an interface.\n // Used to implement ERC-165.\n mapping(bytes4 => bool) supportedInterfaces;\n // owner of the contract\n address contractOwner;\n }\n\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\n bytes32 position = DIAMOND_STORAGE_POSITION;\n assembly {\n ds.slot := position\n }\n }\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function setContractOwner(address _newOwner) internal {\n DiamondStorage storage ds = diamondStorage();\n address previousOwner = ds.contractOwner;\n ds.contractOwner = _newOwner;\n emit OwnershipTransferred(previousOwner, _newOwner);\n }\n\n function contractOwner() internal view returns (address contractOwner_) {\n contractOwner_ = diamondStorage().contractOwner;\n }\n\n function enforceIsContractOwner() internal view {\n require(msg.sender == diamondStorage().contractOwner, \"LibDiamond: Must be contract owner\");\n }\n\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\n\n // Internal function version of diamondCut\n function diamondCut(IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(_diamondCut, _init, _calldata);\n initializeDiamondCut(_init, _calldata);\n }\n\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != _facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(ds, oldFacetAddress, selector);\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n // if function does not exist then do nothing and return\n require(_facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(ds, oldFacetAddress, selector);\n }\n }\n\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\n enforceHasContractCode(_facetAddress, \"LibDiamondCut: New facet has no code\");\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\n ds.facetAddresses.push(_facetAddress);\n }\n\n function addFunction(\n DiamondStorage storage ds,\n bytes4 _selector,\n uint96 _selectorPosition,\n address _facetAddress\n ) internal {\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\n }\n\n function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {\n require(_facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n // an immutable function is a function defined directly in a diamond\n require(_facetAddress != address(this), \"LibDiamondCut: Can't remove immutable function\");\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\n // if not the same then replace _selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\n delete ds.selectorToFacetAndPosition[_selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n ds.facetAddresses.pop();\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n }\n }\n\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\n if (_init == address(0)) {\n require(_calldata.length == 0, \"LibDiamondCut: _init is address(0) but_calldata is not empty\");\n } else {\n require(_calldata.length > 0, \"LibDiamondCut: _calldata is empty but _init is not address(0)\");\n if (_init != address(this)) {\n enforceHasContractCode(_init, \"LibDiamondCut: _init address has no code\");\n }\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\n if (!success) {\n if (error.length > 0) {\n // bubble up the error\n revert(string(error));\n } else {\n revert(\"LibDiamondCut: _init function reverted\");\n }\n }\n }\n }\n\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize > 0, _errorMessage);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file