diff --git a/README.md b/README.md index c1a69ac..bb58bf4 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Overview -> Blockchain Festival is a web-based platform powered by Settlemint for buying and reselling of festival tickets using blockchain technology. By utilising blockchain technology, numerous issues can be eliminated : Scalping , Security and Data Collection. This platform is built on the public Ethereum blockchain with 2 smart contracts utilising the latest standards, where *"FestivalNFT"* follows the ERC721 standard and *"FestivalToken"* follows the ERC20 standard. +> Blockchain Festival is a web-based platform powered by Settlemint for buying and reselling of festival tickets using blockchain technology. By utilising blockchain technology, numerous issues can be eliminated : Scalping , Security and Data Collection. This platform is built on the public Ethereum blockchain with 2 smart contracts utilising the latest standards, where _"FestivalNFT"_ follows the ERC721 standard and _"FestivalToken"_ follows the ERC20 standard. ### Issues tackled @@ -19,6 +19,7 @@ > Data collection is an important aspect for organisers to better understand their target audience to ensure a successful launch of their festival. With blockchain technology, every transaction is tracked and monitored. This gives not just ownership of data to the organiser but also detailed insights. With these insights, organisers will be able to analyse the data and use them to achieve more successful campaigns. # + ## Technical Details ### Smart Contracts @@ -26,12 +27,13 @@ There are 2 contracts listed under the `./contracts` directory. - **FestivalToken** - - ERC20 Token, named FTK, which is used to transact festival tickets (FNFT). + - ERC20 Token, named FTK, which is used to transact festival tickets (FNFT). - **FestivalNFT** - - ERC721 NFT, named FNFT, which is a representation of festival tickets. - - Takes in an ERC20 Token as a parameter for transactions of tickets. In this case, FTK. + - ERC721 NFT, named FNFT, which is a representation of festival tickets. + - Takes in an ERC20 Token as a parameter for transactions of tickets. In this case, FTK. # + ## How does it work? #### Creation of FTK @@ -54,21 +56,21 @@ There are 2 contracts listed under the `./contracts` directory. #### Listing of FNFT on Secondary Market -- When listing of FNFT on the secondary market, the owner's FNFT will be transfered to the FNFT contract to act as an escrow. +- Before listing FNFT on the secondary market, the owner has to first `approve()` to the FNFT contract to transact the FNFT on the owner's behalf using `setListing()` - The owner can list the selling price to no more than 110% of the previous price. +- Depending on the commission amount set by the organiser, the FNFT's owner will receive back the selling price less the commission, upon successful sale of the FNFT. #### Adjusting listing of FNFT on Secondary Market -- The owner can adjust the selling price of the listed FNFT. +- The owner can adjust the selling price of the listed FNFT with `adjustListing()` -#### Remove listing of FNFT on Secondary Market +#### Removing listing of FNFT on Secondary Market -- When removing of FNFT from the secondary market, the owner's FNFT will be transfered back from the FNFT contract to the owner. +- The owner can remove listed FNFT with `removeListing()` #### Purchase of FNFT on the Secondary Market -- When the customer wants to buy a FNFT on the secondary marketplace, the FNFT contract will first `approve()` the customer before the customer is - +- A customer can purchase a FNFT using `purchaseListing()` ### Explanation through HardHat Testing @@ -80,6 +82,15 @@ In your Settlemint Smart Contract Terminal run the following commands : npm run test ``` +## Deployment + +Before Deployment, ensure that you have set up a private key in Settlemint. +In your Settlemint Smart Contract Terminal run the following command : + +```bash +npm run smartcontract:deploy +``` + ## More Information - [Leverage the Graph Middleware to index on chain data](./docs/graph-middleware.md) diff --git a/deploy/00_deploy_example.ts b/deploy/FestivalDeploy.ts similarity index 75% rename from deploy/00_deploy_example.ts rename to deploy/FestivalDeploy.ts index 1dc413b..58ca17e 100755 --- a/deploy/00_deploy_example.ts +++ b/deploy/FestivalDeploy.ts @@ -10,11 +10,26 @@ const migrate: DeployFunction = async ({ getNamedAccounts, deployments: { deploy process.exit(1); } - await deploy('Example', { + const festivalToken = await deploy('FestivalToken', { from: deployer, - args: [], + args: [ + 'FestivalToken', + 'FTK' + ], log: true, }); + + await deploy('FestivalNFT', { + from: deployer, + args: [ + 'FestivalNFT', + 'FNFT', + 'https://gateway-festivalstorage-eafc.settlemint.com/ipfs/QmUczjxs9UYvSjufENGV9qzw17Spo3o4EVFDQKSm3U9b1C?filename=SETTLEMINT_TEST.jpg', + festivalToken.address + ], + log: true, + }); + let hasEtherScanInstance = false; try { await run('verify:get-etherscan-endpoint'); diff --git a/deployments/festival-2ff2/.chainId b/deployments/festival-2ff2/.chainId new file mode 100644 index 0000000..bf0d87a --- /dev/null +++ b/deployments/festival-2ff2/.chainId @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/deployments/festival-2ff2/.migrations.json b/deployments/festival-2ff2/.migrations.json new file mode 100644 index 0000000..c3205ea --- /dev/null +++ b/deployments/festival-2ff2/.migrations.json @@ -0,0 +1,3 @@ +{ + "00_deploy_example": 1663662909 +} \ No newline at end of file diff --git a/deployments/festival-2ff2/FestivalNFT.json b/deployments/festival-2ff2/FestivalNFT.json new file mode 100644 index 0000000..fef398d --- /dev/null +++ b/deployments/festival-2ff2/FestivalNFT.json @@ -0,0 +1,1342 @@ +{ + "address": "0x4F722e21783bc086887dfAb182F0B7Ac1c8003C6", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "string", + "name": "baseTokenURI_", + "type": "string" + }, + { + "internalType": "contract FestivalToken", + "name": "token_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sellingPrice", + "type": "uint256" + } + ], + "name": "AdjustListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MintPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MintUnpaused", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "PublicMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sellingPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "commissionPrice", + "type": "uint256" + } + ], + "name": "PurchaseListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "RemoveListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sellingPrice", + "type": "uint256" + } + ], + "name": "SetListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_PER_TX", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_SUPPLY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRICE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sellingPrice_", + "type": "uint256" + } + ], + "name": "adjustListing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "getCurrentPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "getForSale", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "getSellingPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "commissionPercentage", + "type": "uint256" + } + ], + "name": "monetise", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pauseMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "publicMint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "purchaseListing", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + } + ], + "name": "removeListing", + "outputs": [], + "stateMutability": "nonpayable", + "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": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "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": "baseTokenURI_", + "type": "string" + } + ], + "name": "setBaseURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sellingPrice_", + "type": "uint256" + } + ], + "name": "setListing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startPublicSale", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpauseMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc5969d3a0502c29525e7e50dbe703fdf88f44f1b7c40a2a5d86b36243c59ea2c", + "receipt": { + "to": null, + "from": "0xe65e6686392C8a7570824738Cc4Fd23d4AB7df7d", + "contractAddress": "0x4F722e21783bc086887dfAb182F0B7Ac1c8003C6", + "transactionIndex": 19, + "gasUsed": "5201656", + "logsBloom": "0x00000000000000000000000000000000000004400000002000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000008400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1c63df576501fb92a11b006253cce9640a0c8654d67de59b34e863b11d518f6c", + "transactionHash": "0xc5969d3a0502c29525e7e50dbe703fdf88f44f1b7c40a2a5d86b36243c59ea2c", + "logs": [ + { + "transactionIndex": 19, + "blockNumber": 11412370, + "transactionHash": "0xc5969d3a0502c29525e7e50dbe703fdf88f44f1b7c40a2a5d86b36243c59ea2c", + "address": "0x4F722e21783bc086887dfAb182F0B7Ac1c8003C6", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e65e6686392c8a7570824738cc4fd23d4ab7df7d" + ], + "data": "0x", + "logIndex": 44, + "blockHash": "0x1c63df576501fb92a11b006253cce9640a0c8654d67de59b34e863b11d518f6c" + } + ], + "blockNumber": 11412370, + "cumulativeGasUsed": "8107832", + "status": 1, + "byzantium": true + }, + "args": [ + "FestivalNFT", + "FNFT", + "https://gateway-festivalstorage-eafc.settlemint.com/ipfs/QmUczjxs9UYvSjufENGV9qzw17Spo3o4EVFDQKSm3U9b1C?filename=SETTLEMINT_TEST.jpg", + "0x2460668148DB97441b9beacfe93A0C6dB7632DA1" + ], + "numDeployments": 1, + "solcInputHash": "589f93bfe56eb287c3206c067720a113", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseTokenURI_\",\"type\":\"string\"},{\"internalType\":\"contract FestivalToken\",\"name\":\"token_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sellingPrice\",\"type\":\"uint256\"}],\"name\":\"AdjustListing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MintPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MintUnpaused\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"PublicMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sellingPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"commissionPrice\",\"type\":\"uint256\"}],\"name\":\"PurchaseListing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"RemoveListing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sellingPrice\",\"type\":\"uint256\"}],\"name\":\"SetListing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_PER_TX\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_SUPPLY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellingPrice_\",\"type\":\"uint256\"}],\"name\":\"adjustListing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"getCurrentPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"getForSale\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"getSellingPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commissionPercentage\",\"type\":\"uint256\"}],\"name\":\"monetise\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"publicMint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"purchaseListing\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"}],\"name\":\"removeListing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":\"baseTokenURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellingPrice_\",\"type\":\"uint256\"}],\"name\":\"setListing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startPublicSale\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FestivalNFT.sol\":\"FestivalNFT\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing 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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"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.7.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 = _owners[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 nor 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor 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(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) 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 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 _owners[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(\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) 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);\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\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);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId);\\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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId);\\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(\\n address owner,\\n address operator,\\n bool approved\\n ) 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\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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.\\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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x0b606994df12f0ce35f6d2f6dcdde7e55e6899cdef7e00f180980caa81e3844e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"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.7.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 nor approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0xfa6873a010382f62e9ffe4592b305ef6e60f55502c95ed0ffa51eb10b5200d45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\n\\n/**\\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\\n * enumerability of all the token ids in the contract as well as all token ids owned by each\\n * account.\\n */\\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\\n // Mapping from owner to list of owned token IDs\\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\\n\\n // Mapping from token ID to index of the owner tokens list\\n mapping(uint256 => uint256) private _ownedTokensIndex;\\n\\n // Array with all token ids, used for enumeration\\n uint256[] private _allTokens;\\n\\n // Mapping from token id to position in the allTokens array\\n mapping(uint256 => uint256) private _allTokensIndex;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721.balanceOf(owner), \\\"ERC721Enumerable: owner index out of bounds\\\");\\n return _ownedTokens[owner][index];\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _allTokens.length;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721Enumerable.totalSupply(), \\\"ERC721Enumerable: global index out of bounds\\\");\\n return _allTokens[index];\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n if (from == address(0)) {\\n _addTokenToAllTokensEnumeration(tokenId);\\n } else if (from != to) {\\n _removeTokenFromOwnerEnumeration(from, tokenId);\\n }\\n if (to == address(0)) {\\n _removeTokenFromAllTokensEnumeration(tokenId);\\n } else if (to != from) {\\n _addTokenToOwnerEnumeration(to, tokenId);\\n }\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\\n * @param to address representing the new owner of the given token ID\\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\\n */\\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\\n uint256 length = ERC721.balanceOf(to);\\n _ownedTokens[to][length] = tokenId;\\n _ownedTokensIndex[tokenId] = length;\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's token tracking data structures.\\n * @param tokenId uint256 ID of the token to be added to the tokens list\\n */\\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\\n _allTokensIndex[tokenId] = _allTokens.length;\\n _allTokens.push(tokenId);\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\\n * @param from address representing the previous owner of the given token ID\\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\\n */\\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary\\n if (tokenIndex != lastTokenIndex) {\\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\\n\\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n }\\n\\n // This also deletes the contents at the last position of the array\\n delete _ownedTokensIndex[tokenId];\\n delete _ownedTokens[from][lastTokenIndex];\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's token tracking data structures.\\n * This has O(1) time complexity, but alters the order of the _allTokens array.\\n * @param tokenId uint256 ID of the token to be removed from the tokens list\\n */\\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = _allTokens.length - 1;\\n uint256 tokenIndex = _allTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\\n uint256 lastTokenId = _allTokens[lastTokenIndex];\\n\\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n\\n // This also deletes the contents at the last position of the array\\n delete _allTokensIndex[tokenId];\\n _allTokens.pop();\\n }\\n}\\n\",\"keccak256\":\"0x0a79511df8151b10b0a0004d6a76ad956582d32824af4c0f4886bdbdfe5746e5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC721 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n */\\nabstract contract ERC721Pausable is ERC721, Pausable {\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xa2695a4c7b192f34b98a3875dfce54c8c6c4976b898a5598b1ce0355ce2e6c56\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"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.7.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 *\\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"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.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_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\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"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\"},\"contracts/FestivalNFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// SettleMint.com , Elton Tay\\n\\npragma solidity ^0.8.9;\\n\\n// Removed opensea, reserves, whitelist, royalty, freeze, batch\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"./library/token/ERC721/extensions/ERC721MintPausable.sol\\\";\\n// Additional import\\nimport \\\"./FestivalToken.sol\\\";\\n\\ncontract FestivalNFT is\\n ERC721Enumerable,\\n ERC721Burnable,\\n ERC721Pausable,\\n ERC721MintPausable,\\n Ownable,\\n ReentrancyGuard\\n{\\n //////////////////////////////////////////////////////////////////\\n // CONFIGURATION //\\n //////////////////////////////////////////////////////////////////\\n uint256 public constant PRICE = 10 * 10 ** 18; // Price per Festival NFT, set at 10 FTK\\n uint256 public constant MAX_PER_TX = 5; // Limiting to 5 for family purchase of FNFTs\\n uint256 public constant MAX_SUPPLY = 1000; // Total amount of FNFTs\\n\\n //////////////////////////////////////////////////////////////////\\n // TOKEN STORAGE //\\n //////////////////////////////////////////////////////////////////\\n\\n uint256 private _tokenId;\\n string private _baseTokenURI; // the IPFS url to the folder holding the metadata.\\n\\n //////////////////////////////////////////////////////////////////\\n // CROWDSALE STORAGE //\\n //////////////////////////////////////////////////////////////////\\n\\n address payable private immutable _organiser; // address of the festival owner\\n bool private _publicSaleOpen = false; // is the public sale open?\\n\\n //////////////////////////////////////////////////////////////////\\n // FESTIVAL DETAILS //\\n //////////////////////////////////////////////////////////////////\\n\\n // Structure of each ticket\\n struct TicketDetails {\\n address ticketOwner;\\n uint256 currentPrice;\\n uint256 sellingPrice;\\n bool forSale;\\n }\\n\\n bool private monetisation = false; // default monetisation (commision) set to false\\n uint256 private commission = 0; // default commission value set to 0\\n mapping(uint256 => TicketDetails) private _ticketDetails; // mapping structure of ticket to each ticket\\n\\n // events\\n event PublicMint(address buyer, uint256 ticketId);\\n event PurchaseListing(address buyer, address seller, uint256 sellingPrice, uint256 commissionPrice);\\n event SetListing(address owner, uint256 ticketId, uint256 sellingPrice);\\n event RemoveListing(address owner, uint256 ticketId);\\n event AdjustListing(address owner, uint256 ticketId, uint256 sellingPrice);\\n\\n FestivalToken private _token;\\n\\n constructor(\\n string memory name_,\\n string memory symbol_,\\n string memory baseTokenURI_,\\n FestivalToken token_\\n ) ERC721(name_, symbol_) {\\n _baseTokenURI = baseTokenURI_;\\n _organiser = payable(_msgSender());\\n _token = token_;\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // CORE FUNCTIONS //\\n //////////////////////////////////////////////////////////////////\\n\\n function setBaseURI(string memory baseTokenURI_) public onlyOwner {\\n _baseTokenURI = baseTokenURI_;\\n }\\n\\n function _baseURI() internal view override returns (string memory) {\\n return _baseTokenURI;\\n }\\n\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n string memory tokenUri = super.tokenURI(tokenId);\\n return bytes(tokenUri).length > 0 ? string(abi.encodePacked(tokenUri, \\\".json\\\")) : \\\"\\\";\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal override(ERC721, ERC721Enumerable, ERC721Pausable, ERC721MintPausable) {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal override(ERC721) {\\n super._afterTokenTransfer(from, to, tokenId);\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // PUBLIC SALE //\\n //////////////////////////////////////////////////////////////////\\n\\n function startPublicSale() public onlyOwner {\\n _publicSaleOpen = true;\\n }\\n\\n function publicMint(uint256 count) public payable nonReentrant {\\n require(_publicSaleOpen, \\\"Public sale not active\\\");\\n require(_tokenId + count <= MAX_SUPPLY, \\\"Exceeds max supply\\\");\\n require(count <= MAX_PER_TX, \\\"Exceeds max per transaction\\\");\\n require(balanceOf(_msgSender()) + count <= MAX_PER_TX, \\\"Exceeds maximum public minting\\\");\\n _token.transferFrom(_msgSender(),_organiser, count * PRICE); // Error will throw if insufficient funds\\n\\n for (uint256 i; i < count; i++) {\\n _mint(_msgSender(), ++_tokenId);\\n _ticketDetails[_tokenId] = TicketDetails({ // initialise structure to ticket\\n ticketOwner: _msgSender(),\\n currentPrice: PRICE,\\n sellingPrice: 0,\\n forSale: false\\n });\\n emit PublicMint(_msgSender(),_tokenId);\\n }\\n\\n\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // POST SALE MANAGEMENT //\\n //////////////////////////////////////////////////////////////////\\n\\n function withdraw() public {\\n _organiser.transfer(address(this).balance);\\n }\\n\\n function wallet() public view returns (address) {\\n return _organiser;\\n }\\n\\n function _burn(uint256 tokenId) internal override(ERC721) {\\n super._burn(tokenId);\\n }\\n\\n function burn(uint256 tokenId) public override {\\n _burn(tokenId);\\n }\\n\\n\\n //////////////////////////////////////////////////////////////////\\n // Pausable & MintPausable //\\n //////////////////////////////////////////////////////////////////\\n\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n function pauseMint() public onlyOwner {\\n _pauseMint();\\n }\\n\\n function unpauseMint() public onlyOwner {\\n _unpauseMint();\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // ERC165 //\\n //////////////////////////////////////////////////////////////////\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {\\n return\\n interfaceId == type(Ownable).interfaceId ||\\n interfaceId == type(ERC721Burnable).interfaceId ||\\n interfaceId == type(ERC721Enumerable).interfaceId ||\\n interfaceId == type(ERC721MintPausable).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // Festival Functions //\\n //////////////////////////////////////////////////////////////////\\n\\n //////////////////////////////////////////////////////////////////\\n // Modifier Functions //\\n //////////////////////////////////////////////////////////////////\\n\\n /*\\n Modifier - Validate that the selling price does not exceed 110% (1.1x) more than the\\n current price.\\n */\\n\\n modifier checkSellingPrice(uint256 ticketId, uint256 sellingPrice) {\\n uint256 currentPrice = _ticketDetails[ticketId].currentPrice;\\n require(\\n sellingPrice <= ((currentPrice * 110) / 100),\\n \\\"Re-selling price is more than 110%\\\"\\n );\\n _;\\n }\\n\\n /*\\n Modifier - Check msg sender is ticket owner\\n */\\n\\n modifier checkTicketIsOwner(uint256 ticketId, address ticketOwner) {\\n address realOwner = _ticketDetails[ticketId].ticketOwner;\\n require(realOwner == ticketOwner, \\\"You are not the ticket owner.\\\");\\n _;\\n }\\n\\n /*\\n Modifier - Check msg sender is not ticket owner\\n */\\n\\n modifier checkTicketIsNotOwner(uint256 ticketId, address ticketOwner) {\\n address realOwner = _ticketDetails[ticketId].ticketOwner;\\n require(realOwner != ticketOwner, \\\"You are the ticket owner.\\\");\\n _;\\n }\\n\\n /*\\n Modifier - Check if ticket is on sale\\n */\\n\\n modifier checkTicketOnSale(uint256 ticketId) {\\n require(_ticketDetails[ticketId].forSale, \\\"Ticket is not on sale.\\\");\\n _;\\n }\\n\\n /*\\n Modifier - Check if ticket is not on sale\\n */\\n\\n modifier checkTicketNotOnSale(uint256 ticketId) {\\n require(!_ticketDetails[ticketId].forSale, \\\"Ticket is on sale.\\\");\\n _;\\n }\\n\\n /*\\n Modifier - Check if value is sufficient for ticket purchase\\n */\\n\\n modifier checkSufficientValue(uint256 ticketId, uint256 value) {\\n require(value >= _ticketDetails[ticketId].sellingPrice, \\\"Insufficient token for purchase.\\\");\\n _;\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // Secondary Marketplace Functions //\\n //////////////////////////////////////////////////////////////////\\n\\n /*\\n List ticket on secondary market.\\n - Checks selling price validity\\n - Checks ticket owner is msg sender\\n - Checks ticket is not on sale\\n */\\n\\n function setListing(uint256 ticketId, uint256 sellingPrice_)\\n public\\n checkSellingPrice(ticketId, sellingPrice_)\\n checkTicketIsOwner(ticketId, _msgSender())\\n checkTicketNotOnSale(ticketId)\\n {\\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\\n _ticketDetails[ticketId].forSale = true;\\n\\n emit SetListing(_msgSender(),ticketId,sellingPrice_);\\n }\\n\\n /*\\n Remove ticket listing on secondary market.\\n - Checks ticket owner is msg sender\\n - Checks if ticket is on sale\\n */\\n\\n function removeListing(uint256 ticketId)\\n public\\n checkTicketIsOwner(ticketId, _msgSender())\\n checkTicketOnSale(ticketId)\\n {\\n _ticketDetails[ticketId].sellingPrice = 0;\\n _ticketDetails[ticketId].forSale = false;\\n\\n emit RemoveListing(_msgSender(),ticketId);\\n }\\n\\n /*\\n Adjust ticket listing on secondary market.\\n - Checks selling price validity\\n - Checks ticket owner is msg sender\\n - Checks if ticket is on sale\\n */\\n\\n function adjustListing(uint256 ticketId, uint256 sellingPrice_)\\n public\\n checkSellingPrice(ticketId, sellingPrice_)\\n checkTicketIsOwner(ticketId, _msgSender())\\n checkTicketOnSale(ticketId)\\n {\\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\\n\\n emit AdjustListing(_msgSender(),ticketId,sellingPrice_);\\n }\\n\\n /*\\n Buy ticket listing on secondary market.\\n - Check sufficient buying power\\n - Check ticket owner is not msg sender\\n - Checks if ticket is on sale\\n */\\n\\n function purchaseListing(uint256 ticketId, uint256 value)\\n public\\n payable\\n checkSufficientValue(ticketId, value)\\n checkTicketIsNotOwner(ticketId, _msgSender())\\n checkTicketOnSale(ticketId)\\n {\\n\\n address seller = _ticketDetails[ticketId].ticketOwner;\\n uint256 sellingPrice = _ticketDetails[ticketId].sellingPrice;\\n uint256 commissionPrice = (sellingPrice * commission) / 100;\\n // Transferring of Tokens\\n _token.transferFrom(_msgSender(), seller, sellingPrice - commissionPrice);\\n if (commissionPrice > 0) {\\n _token.transferFrom(_msgSender(), _organiser, commissionPrice);\\n }\\n\\n // Transferring of NFT\\n this.transferFrom(seller, _msgSender(), ticketId);\\n\\n // Adjust ticket details\\n _ticketDetails[ticketId].ticketOwner = _msgSender();\\n _ticketDetails[ticketId].currentPrice = sellingPrice;\\n _ticketDetails[ticketId].forSale = false;\\n\\n emit PurchaseListing(_msgSender(),seller,sellingPrice,commissionPrice);\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // Owner Functions //\\n //////////////////////////////////////////////////////////////////\\n\\n /*\\n Monetisation option\\n Input in whole numbers - E.g. 10% = 10, 100% = 100\\n Limitation range : 0 - 100\\n */\\n function monetise(uint256 commissionPercentage) public onlyOwner {\\n commission = commissionPercentage;\\n }\\n\\n //////////////////////////////////////////////////////////////////\\n // Getter Functions //\\n //////////////////////////////////////////////////////////////////\\n\\n function getCurrentPrice(uint256 ticketId) public view returns (uint256) {\\n return _ticketDetails[ticketId].currentPrice;\\n }\\n\\n function getSellingPrice(uint256 ticketId) public view returns (uint256) {\\n return _ticketDetails[ticketId].sellingPrice;\\n }\\n\\n function getForSale(uint256 ticketId) public view returns (bool) {\\n return _ticketDetails[ticketId].forSale;\\n }\\n\\n}\\n\",\"keccak256\":\"0xb0181f22853533dfcc68ff88161729640208db9b659412049945f0e17f13d4b4\",\"license\":\"MIT\"},\"contracts/FestivalToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// SettleMint.com\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @title GenericToken\\n * @notice This contract is a generic token adhering to the ERC20 standard,\\n * using the OpenZeppelin template libary for battletested functionality.\\n *\\n * It incorporates the standard ERC20 functions, enhanced with Minting\\n * and Burning, Pausable in case of emergencies and AccessControl for locking\\n * down the administrative functions.\\n *\\n * For demonstrative purposes, 1 million GT tokens are pre-mined to the address\\n * deploying this contract.\\n */\\ncontract FestivalToken is ERC165, ERC20, ERC20Burnable, Pausable, AccessControl {\\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _mint(msg.sender, 1000000 * 10**decimals());\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\\n return\\n interfaceId == type(IERC20).interfaceId ||\\n interfaceId == type(ERC20Burnable).interfaceId ||\\n interfaceId == type(Pausable).interfaceId ||\\n super.supportsInterface(interfaceId); // ERC165, AccessControl\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\\n */\\n function pause() public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _pause();\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\\n */\\n function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing 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 * - `msg.sender` needs the DEFAULT_ADMIN_ROLE.\\n *\\n * @param to The address to mint the new tokens into\\n * @param amount The amount of tokens to mint, denominated by the decimals() function\\n */\\n function mint(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the 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 * @param amount The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function\\n */\\n function burn(uint256 amount) public virtual override {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens 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 function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override whenNotPaused {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xbca1f4eef8b9b9871a00e1ba691ec5b92261e278afb8c55f1a5fe870ef3f7025\",\"license\":\"MIT\"},\"contracts/library/token/ERC721/extensions/ERC721MintPausable.sol\":{\"content\":\"/**\\n * Copyright (C) SettleMint NV - All Rights Reserved\\n *\\n * Use of this file is strictly prohibited without an active subscription.\\n * Distribution of this file, via any medium, is strictly prohibited.\\n *\\n * For license inquiries, contact hello@settlemint.com\\n *\\n * SPDX-License-Identifier: UNLICENSED\\n */\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\nabstract contract ERC721MintPausable is ERC721 {\\n bool private _mintingPaused;\\n\\n event MintPaused(address account);\\n event MintUnpaused(address account);\\n\\n modifier whenMintNotPaused() {\\n require(!mintPaused(), \\\"ERC721MintPausable: Mint paused\\\");\\n _;\\n }\\n\\n modifier whenMintPaused() {\\n require(mintPaused(), \\\"ERC721MintPausable: Mint not paused\\\");\\n _;\\n }\\n\\n constructor() {\\n _mintingPaused = false;\\n }\\n\\n function mintPaused() public view returns (bool) {\\n return _mintingPaused;\\n }\\n\\n function _pauseMint() internal virtual whenMintNotPaused {\\n _mintingPaused = true;\\n }\\n\\n function _unpauseMint() internal virtual whenMintPaused {\\n _mintingPaused = false;\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n require((!mintPaused() || from != address(0)), \\\"ERC721MintPausable: Minting is disabled\\\");\\n }\\n}\\n\",\"keccak256\":\"0x4d7fc36b8dae8360db871421c4f81e80c9fb8a4e0e156ee31ed03a066f6894b3\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040526000600e60006101000a81548160ff0219169083151502179055506000600e60016101000a81548160ff0219169083151502179055506000600f553480156200004c57600080fd5b5060405162005f2338038062005f23833981810160405281019062000072919062000541565b838381600090805190602001906200008c9291906200027b565b508060019080519060200190620000a59291906200027b565b5050506000600a60006101000a81548160ff0219169083151502179055506000600a60016101000a81548160ff021916908315150217905550620000fe620000f2620001ad60201b60201c565b620001b560201b60201c565b6001600b8190555081600d90805190602001906200011e9291906200027b565b506200012f620001ad60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000675565b600033905090565b6000600a60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82805462000289906200063f565b90600052602060002090601f016020900481019282620002ad5760008555620002f9565b82601f10620002c857805160ff1916838001178555620002f9565b82800160010185558215620002f9579182015b82811115620002f8578251825591602001919060010190620002db565b5b5090506200030891906200030c565b5090565b5b80821115620003275760008160009055506001016200030d565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620003948262000349565b810181811067ffffffffffffffff82111715620003b657620003b56200035a565b5b80604052505050565b6000620003cb6200032b565b9050620003d9828262000389565b919050565b600067ffffffffffffffff821115620003fc57620003fb6200035a565b5b620004078262000349565b9050602081019050919050565b60005b838110156200043457808201518184015260208101905062000417565b8381111562000444576000848401525b50505050565b6000620004616200045b84620003de565b620003bf565b90508281526020810184848401111562000480576200047f62000344565b5b6200048d84828562000414565b509392505050565b600082601f830112620004ad57620004ac6200033f565b5b8151620004bf8482602086016200044a565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620004f582620004c8565b9050919050565b60006200050982620004e8565b9050919050565b6200051b81620004fc565b81146200052757600080fd5b50565b6000815190506200053b8162000510565b92915050565b600080600080608085870312156200055e576200055d62000335565b5b600085015167ffffffffffffffff8111156200057f576200057e6200033a565b5b6200058d8782880162000495565b945050602085015167ffffffffffffffff811115620005b157620005b06200033a565b5b620005bf8782880162000495565b935050604085015167ffffffffffffffff811115620005e357620005e26200033a565b5b620005f18782880162000495565b925050606062000604878288016200052a565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200065857607f821691505b602082108114156200066f576200066e62000610565b5b50919050565b60805161587d620006a660003960008181610c62015281816118c901528181611b880152611e4a015261587d6000f3fe6080604052600436106102505760003560e01c8063521eb273116101395780638da5cb5b116100b6578063c87b56dd1161007a578063c87b56dd14610859578063cd85cdb514610896578063d7c0f476146108ad578063e985e9c5146108d6578063f2fde38b14610913578063f43a22dc1461093c57610250565b80638da5cb5b1461077457806395d89b411461079f578063a22cb465146107ca578063b88d4fde146107f3578063c55d0f561461081c57610250565b806370a08231116100fd57806370a08231146106b3578063715018a6146106f05780637e4831d3146107075780638456cb59146107325780638d859f3e1461074957610250565b8063521eb273146105ba57806355f804b3146105e5578063569e35db1461060e5780635c975abb1461064b5780636352211e1461067657610250565b8063292c42c5116101d25780633ccfd60b116101965780633ccfd60b146104d45780633f4ba83a146104eb57806342842e0e1461050257806342966c681461052b578063479ad4c3146105545780634f6ccce71461057d57610250565b8063292c42c5146103ea5780632abacf8c146104135780632db11544146104505780632f745c591461046c57806332cb6b0c146104a957610250565b80630c1c972a116102195780630c1c972a1461033f57806318160ddd146103565780631a8bd2da146103815780631d4087721461039857806323b872dd146103c157610250565b8062b395f41461025557806301ffc9a71461027157806306fdde03146102ae578063081812fc146102d9578063095ea7b314610316575b600080fd5b61026f600480360381019061026a9190613bff565b610967565b005b34801561027d57600080fd5b5061029860048036038101906102939190613c97565b610e61565b6040516102a59190613cdf565b60405180910390f35b3480156102ba57600080fd5b506102c3611013565b6040516102d09190613d93565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb9190613db5565b6110a5565b60405161030d9190613e23565b60405180910390f35b34801561032257600080fd5b5061033d60048036038101906103389190613e6a565b6110eb565b005b34801561034b57600080fd5b50610354611203565b005b34801561036257600080fd5b5061036b611228565b6040516103789190613eb9565b60405180910390f35b34801561038d57600080fd5b50610396611235565b005b3480156103a457600080fd5b506103bf60048036038101906103ba9190613bff565b611247565b005b3480156103cd57600080fd5b506103e860048036038101906103e39190613ed4565b61143d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190613bff565b61149d565b005b34801561041f57600080fd5b5061043a60048036038101906104359190613db5565b6116c3565b6040516104479190613cdf565b60405180910390f35b61046a60048036038101906104659190613db5565b6116f0565b005b34801561047857600080fd5b50610493600480360381019061048e9190613e6a565b611adb565b6040516104a09190613eb9565b60405180910390f35b3480156104b557600080fd5b506104be611b80565b6040516104cb9190613eb9565b60405180910390f35b3480156104e057600080fd5b506104e9611b86565b005b3480156104f757600080fd5b50610500611bef565b005b34801561050e57600080fd5b5061052960048036038101906105249190613ed4565b611c01565b005b34801561053757600080fd5b50610552600480360381019061054d9190613db5565b611c21565b005b34801561056057600080fd5b5061057b60048036038101906105769190613db5565b611c2d565b005b34801561058957600080fd5b506105a4600480360381019061059f9190613db5565b611dd5565b6040516105b19190613eb9565b60405180910390f35b3480156105c657600080fd5b506105cf611e46565b6040516105dc9190613e23565b60405180910390f35b3480156105f157600080fd5b5061060c6004803603810190610607919061405c565b611e6e565b005b34801561061a57600080fd5b5061063560048036038101906106309190613db5565b611e90565b6040516106429190613eb9565b60405180910390f35b34801561065757600080fd5b50610660611eb0565b60405161066d9190613cdf565b60405180910390f35b34801561068257600080fd5b5061069d60048036038101906106989190613db5565b611ec7565b6040516106aa9190613e23565b60405180910390f35b3480156106bf57600080fd5b506106da60048036038101906106d591906140a5565b611f79565b6040516106e79190613eb9565b60405180910390f35b3480156106fc57600080fd5b50610705612031565b005b34801561071357600080fd5b5061071c612045565b6040516107299190613cdf565b60405180910390f35b34801561073e57600080fd5b5061074761205c565b005b34801561075557600080fd5b5061075e61206e565b60405161076b9190613eb9565b60405180910390f35b34801561078057600080fd5b5061078961207a565b6040516107969190613e23565b60405180910390f35b3480156107ab57600080fd5b506107b46120a4565b6040516107c19190613d93565b60405180910390f35b3480156107d657600080fd5b506107f160048036038101906107ec91906140fe565b612136565b005b3480156107ff57600080fd5b5061081a600480360381019061081591906141df565b61214c565b005b34801561082857600080fd5b50610843600480360381019061083e9190613db5565b6121ae565b6040516108509190613eb9565b60405180910390f35b34801561086557600080fd5b50610880600480360381019061087b9190613db5565b6121ce565b60405161088d9190613d93565b60405180910390f35b3480156108a257600080fd5b506108ab612224565b005b3480156108b957600080fd5b506108d460048036038101906108cf9190613db5565b612236565b005b3480156108e257600080fd5b506108fd60048036038101906108f89190614262565b612248565b60405161090a9190613cdf565b60405180910390f35b34801561091f57600080fd5b5061093a600480360381019061093591906140a5565b6122dc565b005b34801561094857600080fd5b50610951612360565b60405161095e9190613eb9565b60405180910390f35b818160106000838152602001908152602001600020600201548110156109c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b9906142ee565b60405180910390fd5b836109cb612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6c9061435a565b60405180910390fd5b866010600082815260200190815260200160002060030160009054906101000a900460ff16610ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad0906143c6565b60405180910390fd5b6000601060008a815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000601060008b815260200190815260200160002060020154905060006064600f5483610b419190614415565b610b4b919061449e565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610b93612365565b858486610ba091906144cf565b6040518463ffffffff1660e01b8152600401610bbe93929190614503565b602060405180830381600087803b158015610bd857600080fd5b505af1158015610bec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c10919061454f565b506000811115610cf457601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610c60612365565b7f0000000000000000000000000000000000000000000000000000000000000000846040518463ffffffff1660e01b8152600401610ca0939291906145db565b602060405180830381600087803b158015610cba57600080fd5b505af1158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf2919061454f565b505b3073ffffffffffffffffffffffffffffffffffffffff166323b872dd84610d19612365565b8e6040518463ffffffff1660e01b8152600401610d3893929190614503565b600060405180830381600087803b158015610d5257600080fd5b505af1158015610d66573d6000803e3d6000fd5b50505050610d72612365565b601060008d815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601060008d8152602001908152602001600020600101819055506000601060008d815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f873ec856d8d09652f7397720e43d00bbce2988df6848c53f215beb895f4a219b610e39612365565b848484604051610e4c9493929190614612565b60405180910390a15050505050505050505050565b60007f0e083076000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f2c57507f42966c68000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610f9457507f79f154c4000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ffc57507f7e4831d3000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061100c575061100b8261236d565b5b9050919050565b60606000805461102290614686565b80601f016020809104026020016040519081016040528092919081815260200182805461104e90614686565b801561109b5780601f106110705761010080835404028352916020019161109b565b820191906000526020600020905b81548152906001019060200180831161107e57829003601f168201915b5050505050905090565b60006110b0826123e7565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006110f682611ec7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115e9061472a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16611186612365565b73ffffffffffffffffffffffffffffffffffffffff1614806111b557506111b4816111af612365565b612248565b5b6111f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111eb906147bc565b60405180910390fd5b6111fe8383612432565b505050565b61120b6124eb565b6001600e60006101000a81548160ff021916908315150217905550565b6000600880549050905090565b61123d6124eb565b611245612569565b565b81816000601060008481526020019081526020016000206001015490506064606e826112739190614415565b61127d919061449e565b8211156112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b69061484e565b60405180910390fd5b846112c8612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611368906148ba565b60405180910390fd5b876010600082815260200190815260200160002060030160009054906101000a900460ff166113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc906143c6565b60405180910390fd5b87601060008b8152602001908152602001600020600201819055507f8d7fdd858b5f0584cd2be0a43e8d5d9cccd17670d5e9ec6c78573c50e4f1263f611419612365565b8a8a60405161142a939291906148da565b60405180910390a1505050505050505050565b61144e611448612365565b826125cd565b61148d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148490614983565b60405180910390fd5b611498838383612662565b505050565b81816000601060008481526020019081526020016000206001015490506064606e826114c99190614415565b6114d3919061449e565b821115611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c9061484e565b60405180910390fd5b8461151e612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146115c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115be906148ba565b60405180910390fd5b876010600082815260200190815260200160002060030160009054906101000a900460ff161561162c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611623906149ef565b60405180910390fd5b87601060008b8152602001908152602001600020600201819055506001601060008b815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f19754625af3ab9ccbf5e460bb9b249b96523b16919373e4f84114c808dc2366461169f612365565b8a8a6040516116b0939291906148da565b60405180910390a1505050505050505050565b60006010600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b6002600b541415611736576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172d90614a5b565b60405180910390fd5b6002600b81905550600e60009054906101000a900460ff1661178d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178490614ac7565b60405180910390fd5b6103e881600c5461179e9190614ae7565b11156117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d690614b89565b60405180910390fd5b6005811115611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181a90614bf5565b60405180910390fd5b600581611836611831612365565b611f79565b6118409190614ae7565b1115611881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187890614c61565b60405180910390fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6118c7612365565b7f0000000000000000000000000000000000000000000000000000000000000000678ac7230489e80000856118fc9190614415565b6040518463ffffffff1660e01b815260040161191a939291906145db565b602060405180830381600087803b15801561193457600080fd5b505af1158015611948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196c919061454f565b5060005b81811015611acf5761199d611983612365565b600c6000815461199290614c81565b9190508190556128c9565b60405180608001604052806119b0612365565b73ffffffffffffffffffffffffffffffffffffffff168152602001678ac7230489e800008152602001600081526020016000151581525060106000600c54815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050507f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed2611aa3612365565b600c54604051611ab4929190614cca565b60405180910390a18080611ac790614c81565b915050611970565b506001600b8190555050565b6000611ae683611f79565b8210611b27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1e90614d65565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b6103e881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611bec573d6000803e3d6000fd5b50565b611bf76124eb565b611bff612aa3565b565b611c1c8383836040518060200160405280600081525061214c565b505050565b611c2a81612b06565b50565b80611c36612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd6906148ba565b60405180910390fd5b836010600082815260200190815260200160002060030160009054906101000a900460ff16611d43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3a906143c6565b60405180910390fd5b6000601060008781526020019081526020016000206002018190555060006010600087815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f6f1991d9c8f21df2e00295840f26ecebb63e6f0d2f1e57dd81acdbefe3996ee3611db7612365565b86604051611dc6929190614cca565b60405180910390a15050505050565b6000611ddf611228565b8210611e20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1790614df7565b60405180910390fd5b60088281548110611e3457611e33614e17565b5b90600052602060002001549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b611e766124eb565b80600d9080519060200190611e8c929190613b12565b5050565b600060106000838152602001908152602001600020600201549050919050565b6000600a60009054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6790614e92565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611fea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe190614f24565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6120396124eb565b6120436000612b12565b565b6000600a60019054906101000a900460ff16905090565b6120646124eb565b61206c612bd8565b565b678ac7230489e8000081565b6000600a60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546120b390614686565b80601f01602080910402602001604051908101604052809291908181526020018280546120df90614686565b801561212c5780601f106121015761010080835404028352916020019161212c565b820191906000526020600020905b81548152906001019060200180831161210f57829003601f168201915b5050505050905090565b612148612141612365565b8383612c3b565b5050565b61215d612157612365565b836125cd565b61219c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219390614983565b60405180910390fd5b6121a884848484612da8565b50505050565b600060106000838152602001908152602001600020600101549050919050565b606060006121db83612e04565b905060008151116121fb576040518060200160405280600081525061221c565b8060405160200161220c9190614fcc565b6040516020818303038152906040525b915050919050565b61222c6124eb565b612234612e6c565b565b61223e6124eb565b80600f8190555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6122e46124eb565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234b90615060565b60405180910390fd5b61235d81612b12565b50565b600581565b600033905090565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123e057506123df82612ed1565b5b9050919050565b6123f081612fb3565b61242f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242690614e92565b60405180910390fd5b50565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166124a583611ec7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6124f3612365565b73ffffffffffffffffffffffffffffffffffffffff1661251161207a565b73ffffffffffffffffffffffffffffffffffffffff1614612567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255e906150cc565b60405180910390fd5b565b612571612045565b6125b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a79061515e565b60405180910390fd5b6000600a60016101000a81548160ff021916908315150217905550565b6000806125d983611ec7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061261b575061261a8185612248565b5b8061265957508373ffffffffffffffffffffffffffffffffffffffff16612641846110a5565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661268282611ec7565b73ffffffffffffffffffffffffffffffffffffffff16146126d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126cf906151f0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273f90615282565b60405180910390fd5b61275383838361301f565b61275e600082612432565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546127ae91906144cf565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128059190614ae7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128c483838361302f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612939576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612930906152ee565b60405180910390fd5b61294281612fb3565b15612982576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129799061535a565b60405180910390fd5b61298e6000838361301f565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129de9190614ae7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a9f6000838361302f565b5050565b612aab61303f565b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612aef612365565b604051612afc9190613e23565b60405180910390a1565b612b0f81613088565b50565b6000600a60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612be06131a5565b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c24612365565b604051612c319190613e23565b60405180910390a1565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612caa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ca1906153c6565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612d9b9190613cdf565b60405180910390a3505050565b612db3848484612662565b612dbf848484846131ef565b612dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df590615458565b60405180910390fd5b50505050565b6060612e0f826123e7565b6000612e19613386565b90506000815111612e395760405180602001604052806000815250612e64565b80612e4384613418565b604051602001612e54929190615478565b6040516020818303038152906040525b915050919050565b612e74612045565b15612eb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eab906154e8565b60405180910390fd5b6001600a60016101000a81548160ff021916908315150217905550565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9c57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612fac5750612fab82613579565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61302a8383836135e3565b505050565b61303a838383613673565b505050565b613047611eb0565b613086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161307d90615554565b60405180910390fd5b565b600061309382611ec7565b90506130a18160008461301f565b6130ac600083612432565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546130fc91906144cf565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46131a18160008461302f565b5050565b6131ad611eb0565b156131ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e4906155c0565b60405180910390fd5b565b60006132108473ffffffffffffffffffffffffffffffffffffffff16613678565b15613379578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613239612365565b8786866040518563ffffffff1660e01b815260040161325b9493929190615635565b602060405180830381600087803b15801561327557600080fd5b505af19250505080156132a657506040513d601f19601f820116820180604052508101906132a39190615696565b60015b613329573d80600081146132d6576040519150601f19603f3d011682016040523d82523d6000602084013e6132db565b606091505b50600081511415613321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161331890615458565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061337e565b600190505b949350505050565b6060600d805461339590614686565b80601f01602080910402602001604051908101604052809291908181526020018280546133c190614686565b801561340e5780601f106133e35761010080835404028352916020019161340e565b820191906000526020600020905b8154815290600101906020018083116133f157829003601f168201915b5050505050905090565b60606000821415613460576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613574565b600082905060005b6000821461349257808061347b90614c81565b915050600a8261348b919061449e565b9150613468565b60008167ffffffffffffffff8111156134ae576134ad613f31565b5b6040519080825280601f01601f1916602001820160405280156134e05781602001600182028036833780820191505090505b5090505b6000851461356d576001826134f991906144cf565b9150600a8561350891906156c3565b60306135149190614ae7565b60f81b81838151811061352a57613529614e17565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85613566919061449e565b94506134e4565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6135ee83838361369b565b6135f6612045565b158061362f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61366e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161366590615766565b60405180910390fd5b505050565b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6136a68383836136f3565b6136ae611eb0565b156136ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136e5906157f8565b60405180910390fd5b505050565b6136fe838383613807565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156137415761373c8161380c565b613780565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461377f5761377e8382613855565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137c3576137be816139c2565b613802565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613801576138008282613a93565b5b5b505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161386284611f79565b61386c91906144cf565b9050600060076000848152602001908152602001600020549050818114613951576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506139d691906144cf565b9050600060096000848152602001908152602001600020549050600060088381548110613a0657613a05614e17565b5b906000526020600020015490508060088381548110613a2857613a27614e17565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480613a7757613a76615818565b5b6001900381819060005260206000200160009055905550505050565b6000613a9e83611f79565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b828054613b1e90614686565b90600052602060002090601f016020900481019282613b405760008555613b87565b82601f10613b5957805160ff1916838001178555613b87565b82800160010185558215613b87579182015b82811115613b86578251825591602001919060010190613b6b565b5b509050613b949190613b98565b5090565b5b80821115613bb1576000816000905550600101613b99565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b613bdc81613bc9565b8114613be757600080fd5b50565b600081359050613bf981613bd3565b92915050565b60008060408385031215613c1657613c15613bbf565b5b6000613c2485828601613bea565b9250506020613c3585828601613bea565b9150509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613c7481613c3f565b8114613c7f57600080fd5b50565b600081359050613c9181613c6b565b92915050565b600060208284031215613cad57613cac613bbf565b5b6000613cbb84828501613c82565b91505092915050565b60008115159050919050565b613cd981613cc4565b82525050565b6000602082019050613cf46000830184613cd0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613d34578082015181840152602081019050613d19565b83811115613d43576000848401525b50505050565b6000601f19601f8301169050919050565b6000613d6582613cfa565b613d6f8185613d05565b9350613d7f818560208601613d16565b613d8881613d49565b840191505092915050565b60006020820190508181036000830152613dad8184613d5a565b905092915050565b600060208284031215613dcb57613dca613bbf565b5b6000613dd984828501613bea565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613e0d82613de2565b9050919050565b613e1d81613e02565b82525050565b6000602082019050613e386000830184613e14565b92915050565b613e4781613e02565b8114613e5257600080fd5b50565b600081359050613e6481613e3e565b92915050565b60008060408385031215613e8157613e80613bbf565b5b6000613e8f85828601613e55565b9250506020613ea085828601613bea565b9150509250929050565b613eb381613bc9565b82525050565b6000602082019050613ece6000830184613eaa565b92915050565b600080600060608486031215613eed57613eec613bbf565b5b6000613efb86828701613e55565b9350506020613f0c86828701613e55565b9250506040613f1d86828701613bea565b9150509250925092565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f6982613d49565b810181811067ffffffffffffffff82111715613f8857613f87613f31565b5b80604052505050565b6000613f9b613bb5565b9050613fa78282613f60565b919050565b600067ffffffffffffffff821115613fc757613fc6613f31565b5b613fd082613d49565b9050602081019050919050565b82818337600083830152505050565b6000613fff613ffa84613fac565b613f91565b90508281526020810184848401111561401b5761401a613f2c565b5b614026848285613fdd565b509392505050565b600082601f83011261404357614042613f27565b5b8135614053848260208601613fec565b91505092915050565b60006020828403121561407257614071613bbf565b5b600082013567ffffffffffffffff8111156140905761408f613bc4565b5b61409c8482850161402e565b91505092915050565b6000602082840312156140bb576140ba613bbf565b5b60006140c984828501613e55565b91505092915050565b6140db81613cc4565b81146140e657600080fd5b50565b6000813590506140f8816140d2565b92915050565b6000806040838503121561411557614114613bbf565b5b600061412385828601613e55565b9250506020614134858286016140e9565b9150509250929050565b600067ffffffffffffffff82111561415957614158613f31565b5b61416282613d49565b9050602081019050919050565b600061418261417d8461413e565b613f91565b90508281526020810184848401111561419e5761419d613f2c565b5b6141a9848285613fdd565b509392505050565b600082601f8301126141c6576141c5613f27565b5b81356141d684826020860161416f565b91505092915050565b600080600080608085870312156141f9576141f8613bbf565b5b600061420787828801613e55565b945050602061421887828801613e55565b935050604061422987828801613bea565b925050606085013567ffffffffffffffff81111561424a57614249613bc4565b5b614256878288016141b1565b91505092959194509250565b6000806040838503121561427957614278613bbf565b5b600061428785828601613e55565b925050602061429885828601613e55565b9150509250929050565b7f496e73756666696369656e7420746f6b656e20666f722070757263686173652e600082015250565b60006142d8602083613d05565b91506142e3826142a2565b602082019050919050565b60006020820190508181036000830152614307816142cb565b9050919050565b7f596f752061726520746865207469636b6574206f776e65722e00000000000000600082015250565b6000614344601983613d05565b915061434f8261430e565b602082019050919050565b6000602082019050818103600083015261437381614337565b9050919050565b7f5469636b6574206973206e6f74206f6e2073616c652e00000000000000000000600082015250565b60006143b0601683613d05565b91506143bb8261437a565b602082019050919050565b600060208201905081810360008301526143df816143a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061442082613bc9565b915061442b83613bc9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614464576144636143e6565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144a982613bc9565b91506144b483613bc9565b9250826144c4576144c361446f565b5b828204905092915050565b60006144da82613bc9565b91506144e583613bc9565b9250828210156144f8576144f76143e6565b5b828203905092915050565b60006060820190506145186000830186613e14565b6145256020830185613e14565b6145326040830184613eaa565b949350505050565b600081519050614549816140d2565b92915050565b60006020828403121561456557614564613bbf565b5b60006145738482850161453a565b91505092915050565b6000819050919050565b60006145a161459c61459784613de2565b61457c565b613de2565b9050919050565b60006145b382614586565b9050919050565b60006145c5826145a8565b9050919050565b6145d5816145ba565b82525050565b60006060820190506145f06000830186613e14565b6145fd60208301856145cc565b61460a6040830184613eaa565b949350505050565b60006080820190506146276000830187613e14565b6146346020830186613e14565b6146416040830185613eaa565b61464e6060830184613eaa565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061469e57607f821691505b602082108114156146b2576146b1614657565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000614714602183613d05565b915061471f826146b8565b604082019050919050565b6000602082019050818103600083015261474381614707565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b60006147a6603e83613d05565b91506147b18261474a565b604082019050919050565b600060208201905081810360008301526147d581614799565b9050919050565b7f52652d73656c6c696e67207072696365206973206d6f7265207468616e20313160008201527f3025000000000000000000000000000000000000000000000000000000000000602082015250565b6000614838602283613d05565b9150614843826147dc565b604082019050919050565b600060208201905081810360008301526148678161482b565b9050919050565b7f596f7520617265206e6f7420746865207469636b6574206f776e65722e000000600082015250565b60006148a4601d83613d05565b91506148af8261486e565b602082019050919050565b600060208201905081810360008301526148d381614897565b9050919050565b60006060820190506148ef6000830186613e14565b6148fc6020830185613eaa565b6149096040830184613eaa565b949350505050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b600061496d602e83613d05565b915061497882614911565b604082019050919050565b6000602082019050818103600083015261499c81614960565b9050919050565b7f5469636b6574206973206f6e2073616c652e0000000000000000000000000000600082015250565b60006149d9601283613d05565b91506149e4826149a3565b602082019050919050565b60006020820190508181036000830152614a08816149cc565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614a45601f83613d05565b9150614a5082614a0f565b602082019050919050565b60006020820190508181036000830152614a7481614a38565b9050919050565b7f5075626c69632073616c65206e6f742061637469766500000000000000000000600082015250565b6000614ab1601683613d05565b9150614abc82614a7b565b602082019050919050565b60006020820190508181036000830152614ae081614aa4565b9050919050565b6000614af282613bc9565b9150614afd83613bc9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614b3257614b316143e6565b5b828201905092915050565b7f45786365656473206d617820737570706c790000000000000000000000000000600082015250565b6000614b73601283613d05565b9150614b7e82614b3d565b602082019050919050565b60006020820190508181036000830152614ba281614b66565b9050919050565b7f45786365656473206d617820706572207472616e73616374696f6e0000000000600082015250565b6000614bdf601b83613d05565b9150614bea82614ba9565b602082019050919050565b60006020820190508181036000830152614c0e81614bd2565b9050919050565b7f45786365656473206d6178696d756d207075626c6963206d696e74696e670000600082015250565b6000614c4b601e83613d05565b9150614c5682614c15565b602082019050919050565b60006020820190508181036000830152614c7a81614c3e565b9050919050565b6000614c8c82613bc9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cbf57614cbe6143e6565b5b600182019050919050565b6000604082019050614cdf6000830185613e14565b614cec6020830184613eaa565b9392505050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000614d4f602b83613d05565b9150614d5a82614cf3565b604082019050919050565b60006020820190508181036000830152614d7e81614d42565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000614de1602c83613d05565b9150614dec82614d85565b604082019050919050565b60006020820190508181036000830152614e1081614dd4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000614e7c601883613d05565b9150614e8782614e46565b602082019050919050565b60006020820190508181036000830152614eab81614e6f565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000614f0e602983613d05565b9150614f1982614eb2565b604082019050919050565b60006020820190508181036000830152614f3d81614f01565b9050919050565b600081905092915050565b6000614f5a82613cfa565b614f648185614f44565b9350614f74818560208601613d16565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000614fb6600583614f44565b9150614fc182614f80565b600582019050919050565b6000614fd88284614f4f565b9150614fe382614fa9565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061504a602683613d05565b915061505582614fee565b604082019050919050565b600060208201905081810360008301526150798161503d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006150b6602083613d05565b91506150c182615080565b602082019050919050565b600060208201905081810360008301526150e5816150a9565b9050919050565b7f4552433732314d696e745061757361626c653a204d696e74206e6f742070617560008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b6000615148602383613d05565b9150615153826150ec565b604082019050919050565b600060208201905081810360008301526151778161513b565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006151da602583613d05565b91506151e58261517e565b604082019050919050565b60006020820190508181036000830152615209816151cd565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061526c602483613d05565b915061527782615210565b604082019050919050565b6000602082019050818103600083015261529b8161525f565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006152d8602083613d05565b91506152e3826152a2565b602082019050919050565b60006020820190508181036000830152615307816152cb565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615344601c83613d05565b915061534f8261530e565b602082019050919050565b6000602082019050818103600083015261537381615337565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006153b0601983613d05565b91506153bb8261537a565b602082019050919050565b600060208201905081810360008301526153df816153a3565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615442603283613d05565b915061544d826153e6565b604082019050919050565b6000602082019050818103600083015261547181615435565b9050919050565b60006154848285614f4f565b91506154908284614f4f565b91508190509392505050565b7f4552433732314d696e745061757361626c653a204d696e742070617573656400600082015250565b60006154d2601f83613d05565b91506154dd8261549c565b602082019050919050565b60006020820190508181036000830152615501816154c5565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061553e601483613d05565b915061554982615508565b602082019050919050565b6000602082019050818103600083015261556d81615531565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006155aa601083613d05565b91506155b582615574565b602082019050919050565b600060208201905081810360008301526155d98161559d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615607826155e0565b61561181856155eb565b9350615621818560208601613d16565b61562a81613d49565b840191505092915050565b600060808201905061564a6000830187613e14565b6156576020830186613e14565b6156646040830185613eaa565b818103606083015261567681846155fc565b905095945050505050565b60008151905061569081613c6b565b92915050565b6000602082840312156156ac576156ab613bbf565b5b60006156ba84828501615681565b91505092915050565b60006156ce82613bc9565b91506156d983613bc9565b9250826156e9576156e861446f565b5b828206905092915050565b7f4552433732314d696e745061757361626c653a204d696e74696e67206973206460008201527f697361626c656400000000000000000000000000000000000000000000000000602082015250565b6000615750602783613d05565b915061575b826156f4565b604082019050919050565b6000602082019050818103600083015261577f81615743565b9050919050565b7f4552433732315061757361626c653a20746f6b656e207472616e73666572207760008201527f68696c6520706175736564000000000000000000000000000000000000000000602082015250565b60006157e2602b83613d05565b91506157ed82615786565b604082019050919050565b60006020820190508181036000830152615811816157d5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220b415615fdbf3e6bbb54badc1ca3ab72fe1daab76b6de8d8a9556b43b080ae04864736f6c63430008090033", + "deployedBytecode": "0x6080604052600436106102505760003560e01c8063521eb273116101395780638da5cb5b116100b6578063c87b56dd1161007a578063c87b56dd14610859578063cd85cdb514610896578063d7c0f476146108ad578063e985e9c5146108d6578063f2fde38b14610913578063f43a22dc1461093c57610250565b80638da5cb5b1461077457806395d89b411461079f578063a22cb465146107ca578063b88d4fde146107f3578063c55d0f561461081c57610250565b806370a08231116100fd57806370a08231146106b3578063715018a6146106f05780637e4831d3146107075780638456cb59146107325780638d859f3e1461074957610250565b8063521eb273146105ba57806355f804b3146105e5578063569e35db1461060e5780635c975abb1461064b5780636352211e1461067657610250565b8063292c42c5116101d25780633ccfd60b116101965780633ccfd60b146104d45780633f4ba83a146104eb57806342842e0e1461050257806342966c681461052b578063479ad4c3146105545780634f6ccce71461057d57610250565b8063292c42c5146103ea5780632abacf8c146104135780632db11544146104505780632f745c591461046c57806332cb6b0c146104a957610250565b80630c1c972a116102195780630c1c972a1461033f57806318160ddd146103565780631a8bd2da146103815780631d4087721461039857806323b872dd146103c157610250565b8062b395f41461025557806301ffc9a71461027157806306fdde03146102ae578063081812fc146102d9578063095ea7b314610316575b600080fd5b61026f600480360381019061026a9190613bff565b610967565b005b34801561027d57600080fd5b5061029860048036038101906102939190613c97565b610e61565b6040516102a59190613cdf565b60405180910390f35b3480156102ba57600080fd5b506102c3611013565b6040516102d09190613d93565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb9190613db5565b6110a5565b60405161030d9190613e23565b60405180910390f35b34801561032257600080fd5b5061033d60048036038101906103389190613e6a565b6110eb565b005b34801561034b57600080fd5b50610354611203565b005b34801561036257600080fd5b5061036b611228565b6040516103789190613eb9565b60405180910390f35b34801561038d57600080fd5b50610396611235565b005b3480156103a457600080fd5b506103bf60048036038101906103ba9190613bff565b611247565b005b3480156103cd57600080fd5b506103e860048036038101906103e39190613ed4565b61143d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190613bff565b61149d565b005b34801561041f57600080fd5b5061043a60048036038101906104359190613db5565b6116c3565b6040516104479190613cdf565b60405180910390f35b61046a60048036038101906104659190613db5565b6116f0565b005b34801561047857600080fd5b50610493600480360381019061048e9190613e6a565b611adb565b6040516104a09190613eb9565b60405180910390f35b3480156104b557600080fd5b506104be611b80565b6040516104cb9190613eb9565b60405180910390f35b3480156104e057600080fd5b506104e9611b86565b005b3480156104f757600080fd5b50610500611bef565b005b34801561050e57600080fd5b5061052960048036038101906105249190613ed4565b611c01565b005b34801561053757600080fd5b50610552600480360381019061054d9190613db5565b611c21565b005b34801561056057600080fd5b5061057b60048036038101906105769190613db5565b611c2d565b005b34801561058957600080fd5b506105a4600480360381019061059f9190613db5565b611dd5565b6040516105b19190613eb9565b60405180910390f35b3480156105c657600080fd5b506105cf611e46565b6040516105dc9190613e23565b60405180910390f35b3480156105f157600080fd5b5061060c6004803603810190610607919061405c565b611e6e565b005b34801561061a57600080fd5b5061063560048036038101906106309190613db5565b611e90565b6040516106429190613eb9565b60405180910390f35b34801561065757600080fd5b50610660611eb0565b60405161066d9190613cdf565b60405180910390f35b34801561068257600080fd5b5061069d60048036038101906106989190613db5565b611ec7565b6040516106aa9190613e23565b60405180910390f35b3480156106bf57600080fd5b506106da60048036038101906106d591906140a5565b611f79565b6040516106e79190613eb9565b60405180910390f35b3480156106fc57600080fd5b50610705612031565b005b34801561071357600080fd5b5061071c612045565b6040516107299190613cdf565b60405180910390f35b34801561073e57600080fd5b5061074761205c565b005b34801561075557600080fd5b5061075e61206e565b60405161076b9190613eb9565b60405180910390f35b34801561078057600080fd5b5061078961207a565b6040516107969190613e23565b60405180910390f35b3480156107ab57600080fd5b506107b46120a4565b6040516107c19190613d93565b60405180910390f35b3480156107d657600080fd5b506107f160048036038101906107ec91906140fe565b612136565b005b3480156107ff57600080fd5b5061081a600480360381019061081591906141df565b61214c565b005b34801561082857600080fd5b50610843600480360381019061083e9190613db5565b6121ae565b6040516108509190613eb9565b60405180910390f35b34801561086557600080fd5b50610880600480360381019061087b9190613db5565b6121ce565b60405161088d9190613d93565b60405180910390f35b3480156108a257600080fd5b506108ab612224565b005b3480156108b957600080fd5b506108d460048036038101906108cf9190613db5565b612236565b005b3480156108e257600080fd5b506108fd60048036038101906108f89190614262565b612248565b60405161090a9190613cdf565b60405180910390f35b34801561091f57600080fd5b5061093a600480360381019061093591906140a5565b6122dc565b005b34801561094857600080fd5b50610951612360565b60405161095e9190613eb9565b60405180910390f35b818160106000838152602001908152602001600020600201548110156109c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b9906142ee565b60405180910390fd5b836109cb612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6c9061435a565b60405180910390fd5b866010600082815260200190815260200160002060030160009054906101000a900460ff16610ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad0906143c6565b60405180910390fd5b6000601060008a815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000601060008b815260200190815260200160002060020154905060006064600f5483610b419190614415565b610b4b919061449e565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610b93612365565b858486610ba091906144cf565b6040518463ffffffff1660e01b8152600401610bbe93929190614503565b602060405180830381600087803b158015610bd857600080fd5b505af1158015610bec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c10919061454f565b506000811115610cf457601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610c60612365565b7f0000000000000000000000000000000000000000000000000000000000000000846040518463ffffffff1660e01b8152600401610ca0939291906145db565b602060405180830381600087803b158015610cba57600080fd5b505af1158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf2919061454f565b505b3073ffffffffffffffffffffffffffffffffffffffff166323b872dd84610d19612365565b8e6040518463ffffffff1660e01b8152600401610d3893929190614503565b600060405180830381600087803b158015610d5257600080fd5b505af1158015610d66573d6000803e3d6000fd5b50505050610d72612365565b601060008d815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601060008d8152602001908152602001600020600101819055506000601060008d815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f873ec856d8d09652f7397720e43d00bbce2988df6848c53f215beb895f4a219b610e39612365565b848484604051610e4c9493929190614612565b60405180910390a15050505050505050505050565b60007f0e083076000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f2c57507f42966c68000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610f9457507f79f154c4000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ffc57507f7e4831d3000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061100c575061100b8261236d565b5b9050919050565b60606000805461102290614686565b80601f016020809104026020016040519081016040528092919081815260200182805461104e90614686565b801561109b5780601f106110705761010080835404028352916020019161109b565b820191906000526020600020905b81548152906001019060200180831161107e57829003601f168201915b5050505050905090565b60006110b0826123e7565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006110f682611ec7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115e9061472a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16611186612365565b73ffffffffffffffffffffffffffffffffffffffff1614806111b557506111b4816111af612365565b612248565b5b6111f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111eb906147bc565b60405180910390fd5b6111fe8383612432565b505050565b61120b6124eb565b6001600e60006101000a81548160ff021916908315150217905550565b6000600880549050905090565b61123d6124eb565b611245612569565b565b81816000601060008481526020019081526020016000206001015490506064606e826112739190614415565b61127d919061449e565b8211156112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b69061484e565b60405180910390fd5b846112c8612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611368906148ba565b60405180910390fd5b876010600082815260200190815260200160002060030160009054906101000a900460ff166113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc906143c6565b60405180910390fd5b87601060008b8152602001908152602001600020600201819055507f8d7fdd858b5f0584cd2be0a43e8d5d9cccd17670d5e9ec6c78573c50e4f1263f611419612365565b8a8a60405161142a939291906148da565b60405180910390a1505050505050505050565b61144e611448612365565b826125cd565b61148d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148490614983565b60405180910390fd5b611498838383612662565b505050565b81816000601060008481526020019081526020016000206001015490506064606e826114c99190614415565b6114d3919061449e565b821115611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c9061484e565b60405180910390fd5b8461151e612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146115c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115be906148ba565b60405180910390fd5b876010600082815260200190815260200160002060030160009054906101000a900460ff161561162c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611623906149ef565b60405180910390fd5b87601060008b8152602001908152602001600020600201819055506001601060008b815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f19754625af3ab9ccbf5e460bb9b249b96523b16919373e4f84114c808dc2366461169f612365565b8a8a6040516116b0939291906148da565b60405180910390a1505050505050505050565b60006010600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b6002600b541415611736576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172d90614a5b565b60405180910390fd5b6002600b81905550600e60009054906101000a900460ff1661178d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178490614ac7565b60405180910390fd5b6103e881600c5461179e9190614ae7565b11156117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d690614b89565b60405180910390fd5b6005811115611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181a90614bf5565b60405180910390fd5b600581611836611831612365565b611f79565b6118409190614ae7565b1115611881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187890614c61565b60405180910390fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd6118c7612365565b7f0000000000000000000000000000000000000000000000000000000000000000678ac7230489e80000856118fc9190614415565b6040518463ffffffff1660e01b815260040161191a939291906145db565b602060405180830381600087803b15801561193457600080fd5b505af1158015611948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196c919061454f565b5060005b81811015611acf5761199d611983612365565b600c6000815461199290614c81565b9190508190556128c9565b60405180608001604052806119b0612365565b73ffffffffffffffffffffffffffffffffffffffff168152602001678ac7230489e800008152602001600081526020016000151581525060106000600c54815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050507f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed2611aa3612365565b600c54604051611ab4929190614cca565b60405180910390a18080611ac790614c81565b915050611970565b506001600b8190555050565b6000611ae683611f79565b8210611b27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1e90614d65565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b6103e881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611bec573d6000803e3d6000fd5b50565b611bf76124eb565b611bff612aa3565b565b611c1c8383836040518060200160405280600081525061214c565b505050565b611c2a81612b06565b50565b80611c36612365565b60006010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd6906148ba565b60405180910390fd5b836010600082815260200190815260200160002060030160009054906101000a900460ff16611d43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3a906143c6565b60405180910390fd5b6000601060008781526020019081526020016000206002018190555060006010600087815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f6f1991d9c8f21df2e00295840f26ecebb63e6f0d2f1e57dd81acdbefe3996ee3611db7612365565b86604051611dc6929190614cca565b60405180910390a15050505050565b6000611ddf611228565b8210611e20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1790614df7565b60405180910390fd5b60088281548110611e3457611e33614e17565b5b90600052602060002001549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b611e766124eb565b80600d9080519060200190611e8c929190613b12565b5050565b600060106000838152602001908152602001600020600201549050919050565b6000600a60009054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6790614e92565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611fea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe190614f24565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6120396124eb565b6120436000612b12565b565b6000600a60019054906101000a900460ff16905090565b6120646124eb565b61206c612bd8565b565b678ac7230489e8000081565b6000600a60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546120b390614686565b80601f01602080910402602001604051908101604052809291908181526020018280546120df90614686565b801561212c5780601f106121015761010080835404028352916020019161212c565b820191906000526020600020905b81548152906001019060200180831161210f57829003601f168201915b5050505050905090565b612148612141612365565b8383612c3b565b5050565b61215d612157612365565b836125cd565b61219c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219390614983565b60405180910390fd5b6121a884848484612da8565b50505050565b600060106000838152602001908152602001600020600101549050919050565b606060006121db83612e04565b905060008151116121fb576040518060200160405280600081525061221c565b8060405160200161220c9190614fcc565b6040516020818303038152906040525b915050919050565b61222c6124eb565b612234612e6c565b565b61223e6124eb565b80600f8190555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6122e46124eb565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234b90615060565b60405180910390fd5b61235d81612b12565b50565b600581565b600033905090565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123e057506123df82612ed1565b5b9050919050565b6123f081612fb3565b61242f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242690614e92565b60405180910390fd5b50565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166124a583611ec7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6124f3612365565b73ffffffffffffffffffffffffffffffffffffffff1661251161207a565b73ffffffffffffffffffffffffffffffffffffffff1614612567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255e906150cc565b60405180910390fd5b565b612571612045565b6125b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a79061515e565b60405180910390fd5b6000600a60016101000a81548160ff021916908315150217905550565b6000806125d983611ec7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061261b575061261a8185612248565b5b8061265957508373ffffffffffffffffffffffffffffffffffffffff16612641846110a5565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661268282611ec7565b73ffffffffffffffffffffffffffffffffffffffff16146126d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126cf906151f0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273f90615282565b60405180910390fd5b61275383838361301f565b61275e600082612432565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546127ae91906144cf565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128059190614ae7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128c483838361302f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612939576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612930906152ee565b60405180910390fd5b61294281612fb3565b15612982576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129799061535a565b60405180910390fd5b61298e6000838361301f565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129de9190614ae7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a9f6000838361302f565b5050565b612aab61303f565b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612aef612365565b604051612afc9190613e23565b60405180910390a1565b612b0f81613088565b50565b6000600a60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612be06131a5565b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c24612365565b604051612c319190613e23565b60405180910390a1565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612caa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ca1906153c6565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612d9b9190613cdf565b60405180910390a3505050565b612db3848484612662565b612dbf848484846131ef565b612dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df590615458565b60405180910390fd5b50505050565b6060612e0f826123e7565b6000612e19613386565b90506000815111612e395760405180602001604052806000815250612e64565b80612e4384613418565b604051602001612e54929190615478565b6040516020818303038152906040525b915050919050565b612e74612045565b15612eb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eab906154e8565b60405180910390fd5b6001600a60016101000a81548160ff021916908315150217905550565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9c57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612fac5750612fab82613579565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61302a8383836135e3565b505050565b61303a838383613673565b505050565b613047611eb0565b613086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161307d90615554565b60405180910390fd5b565b600061309382611ec7565b90506130a18160008461301f565b6130ac600083612432565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546130fc91906144cf565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46131a18160008461302f565b5050565b6131ad611eb0565b156131ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e4906155c0565b60405180910390fd5b565b60006132108473ffffffffffffffffffffffffffffffffffffffff16613678565b15613379578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613239612365565b8786866040518563ffffffff1660e01b815260040161325b9493929190615635565b602060405180830381600087803b15801561327557600080fd5b505af19250505080156132a657506040513d601f19601f820116820180604052508101906132a39190615696565b60015b613329573d80600081146132d6576040519150601f19603f3d011682016040523d82523d6000602084013e6132db565b606091505b50600081511415613321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161331890615458565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061337e565b600190505b949350505050565b6060600d805461339590614686565b80601f01602080910402602001604051908101604052809291908181526020018280546133c190614686565b801561340e5780601f106133e35761010080835404028352916020019161340e565b820191906000526020600020905b8154815290600101906020018083116133f157829003601f168201915b5050505050905090565b60606000821415613460576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613574565b600082905060005b6000821461349257808061347b90614c81565b915050600a8261348b919061449e565b9150613468565b60008167ffffffffffffffff8111156134ae576134ad613f31565b5b6040519080825280601f01601f1916602001820160405280156134e05781602001600182028036833780820191505090505b5090505b6000851461356d576001826134f991906144cf565b9150600a8561350891906156c3565b60306135149190614ae7565b60f81b81838151811061352a57613529614e17565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85613566919061449e565b94506134e4565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6135ee83838361369b565b6135f6612045565b158061362f5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61366e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161366590615766565b60405180910390fd5b505050565b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6136a68383836136f3565b6136ae611eb0565b156136ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136e5906157f8565b60405180910390fd5b505050565b6136fe838383613807565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156137415761373c8161380c565b613780565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461377f5761377e8382613855565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137c3576137be816139c2565b613802565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613801576138008282613a93565b5b5b505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161386284611f79565b61386c91906144cf565b9050600060076000848152602001908152602001600020549050818114613951576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506139d691906144cf565b9050600060096000848152602001908152602001600020549050600060088381548110613a0657613a05614e17565b5b906000526020600020015490508060088381548110613a2857613a27614e17565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480613a7757613a76615818565b5b6001900381819060005260206000200160009055905550505050565b6000613a9e83611f79565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b828054613b1e90614686565b90600052602060002090601f016020900481019282613b405760008555613b87565b82601f10613b5957805160ff1916838001178555613b87565b82800160010185558215613b87579182015b82811115613b86578251825591602001919060010190613b6b565b5b509050613b949190613b98565b5090565b5b80821115613bb1576000816000905550600101613b99565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b613bdc81613bc9565b8114613be757600080fd5b50565b600081359050613bf981613bd3565b92915050565b60008060408385031215613c1657613c15613bbf565b5b6000613c2485828601613bea565b9250506020613c3585828601613bea565b9150509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613c7481613c3f565b8114613c7f57600080fd5b50565b600081359050613c9181613c6b565b92915050565b600060208284031215613cad57613cac613bbf565b5b6000613cbb84828501613c82565b91505092915050565b60008115159050919050565b613cd981613cc4565b82525050565b6000602082019050613cf46000830184613cd0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613d34578082015181840152602081019050613d19565b83811115613d43576000848401525b50505050565b6000601f19601f8301169050919050565b6000613d6582613cfa565b613d6f8185613d05565b9350613d7f818560208601613d16565b613d8881613d49565b840191505092915050565b60006020820190508181036000830152613dad8184613d5a565b905092915050565b600060208284031215613dcb57613dca613bbf565b5b6000613dd984828501613bea565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613e0d82613de2565b9050919050565b613e1d81613e02565b82525050565b6000602082019050613e386000830184613e14565b92915050565b613e4781613e02565b8114613e5257600080fd5b50565b600081359050613e6481613e3e565b92915050565b60008060408385031215613e8157613e80613bbf565b5b6000613e8f85828601613e55565b9250506020613ea085828601613bea565b9150509250929050565b613eb381613bc9565b82525050565b6000602082019050613ece6000830184613eaa565b92915050565b600080600060608486031215613eed57613eec613bbf565b5b6000613efb86828701613e55565b9350506020613f0c86828701613e55565b9250506040613f1d86828701613bea565b9150509250925092565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f6982613d49565b810181811067ffffffffffffffff82111715613f8857613f87613f31565b5b80604052505050565b6000613f9b613bb5565b9050613fa78282613f60565b919050565b600067ffffffffffffffff821115613fc757613fc6613f31565b5b613fd082613d49565b9050602081019050919050565b82818337600083830152505050565b6000613fff613ffa84613fac565b613f91565b90508281526020810184848401111561401b5761401a613f2c565b5b614026848285613fdd565b509392505050565b600082601f83011261404357614042613f27565b5b8135614053848260208601613fec565b91505092915050565b60006020828403121561407257614071613bbf565b5b600082013567ffffffffffffffff8111156140905761408f613bc4565b5b61409c8482850161402e565b91505092915050565b6000602082840312156140bb576140ba613bbf565b5b60006140c984828501613e55565b91505092915050565b6140db81613cc4565b81146140e657600080fd5b50565b6000813590506140f8816140d2565b92915050565b6000806040838503121561411557614114613bbf565b5b600061412385828601613e55565b9250506020614134858286016140e9565b9150509250929050565b600067ffffffffffffffff82111561415957614158613f31565b5b61416282613d49565b9050602081019050919050565b600061418261417d8461413e565b613f91565b90508281526020810184848401111561419e5761419d613f2c565b5b6141a9848285613fdd565b509392505050565b600082601f8301126141c6576141c5613f27565b5b81356141d684826020860161416f565b91505092915050565b600080600080608085870312156141f9576141f8613bbf565b5b600061420787828801613e55565b945050602061421887828801613e55565b935050604061422987828801613bea565b925050606085013567ffffffffffffffff81111561424a57614249613bc4565b5b614256878288016141b1565b91505092959194509250565b6000806040838503121561427957614278613bbf565b5b600061428785828601613e55565b925050602061429885828601613e55565b9150509250929050565b7f496e73756666696369656e7420746f6b656e20666f722070757263686173652e600082015250565b60006142d8602083613d05565b91506142e3826142a2565b602082019050919050565b60006020820190508181036000830152614307816142cb565b9050919050565b7f596f752061726520746865207469636b6574206f776e65722e00000000000000600082015250565b6000614344601983613d05565b915061434f8261430e565b602082019050919050565b6000602082019050818103600083015261437381614337565b9050919050565b7f5469636b6574206973206e6f74206f6e2073616c652e00000000000000000000600082015250565b60006143b0601683613d05565b91506143bb8261437a565b602082019050919050565b600060208201905081810360008301526143df816143a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061442082613bc9565b915061442b83613bc9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614464576144636143e6565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144a982613bc9565b91506144b483613bc9565b9250826144c4576144c361446f565b5b828204905092915050565b60006144da82613bc9565b91506144e583613bc9565b9250828210156144f8576144f76143e6565b5b828203905092915050565b60006060820190506145186000830186613e14565b6145256020830185613e14565b6145326040830184613eaa565b949350505050565b600081519050614549816140d2565b92915050565b60006020828403121561456557614564613bbf565b5b60006145738482850161453a565b91505092915050565b6000819050919050565b60006145a161459c61459784613de2565b61457c565b613de2565b9050919050565b60006145b382614586565b9050919050565b60006145c5826145a8565b9050919050565b6145d5816145ba565b82525050565b60006060820190506145f06000830186613e14565b6145fd60208301856145cc565b61460a6040830184613eaa565b949350505050565b60006080820190506146276000830187613e14565b6146346020830186613e14565b6146416040830185613eaa565b61464e6060830184613eaa565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061469e57607f821691505b602082108114156146b2576146b1614657565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000614714602183613d05565b915061471f826146b8565b604082019050919050565b6000602082019050818103600083015261474381614707565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b60006147a6603e83613d05565b91506147b18261474a565b604082019050919050565b600060208201905081810360008301526147d581614799565b9050919050565b7f52652d73656c6c696e67207072696365206973206d6f7265207468616e20313160008201527f3025000000000000000000000000000000000000000000000000000000000000602082015250565b6000614838602283613d05565b9150614843826147dc565b604082019050919050565b600060208201905081810360008301526148678161482b565b9050919050565b7f596f7520617265206e6f7420746865207469636b6574206f776e65722e000000600082015250565b60006148a4601d83613d05565b91506148af8261486e565b602082019050919050565b600060208201905081810360008301526148d381614897565b9050919050565b60006060820190506148ef6000830186613e14565b6148fc6020830185613eaa565b6149096040830184613eaa565b949350505050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b600061496d602e83613d05565b915061497882614911565b604082019050919050565b6000602082019050818103600083015261499c81614960565b9050919050565b7f5469636b6574206973206f6e2073616c652e0000000000000000000000000000600082015250565b60006149d9601283613d05565b91506149e4826149a3565b602082019050919050565b60006020820190508181036000830152614a08816149cc565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614a45601f83613d05565b9150614a5082614a0f565b602082019050919050565b60006020820190508181036000830152614a7481614a38565b9050919050565b7f5075626c69632073616c65206e6f742061637469766500000000000000000000600082015250565b6000614ab1601683613d05565b9150614abc82614a7b565b602082019050919050565b60006020820190508181036000830152614ae081614aa4565b9050919050565b6000614af282613bc9565b9150614afd83613bc9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614b3257614b316143e6565b5b828201905092915050565b7f45786365656473206d617820737570706c790000000000000000000000000000600082015250565b6000614b73601283613d05565b9150614b7e82614b3d565b602082019050919050565b60006020820190508181036000830152614ba281614b66565b9050919050565b7f45786365656473206d617820706572207472616e73616374696f6e0000000000600082015250565b6000614bdf601b83613d05565b9150614bea82614ba9565b602082019050919050565b60006020820190508181036000830152614c0e81614bd2565b9050919050565b7f45786365656473206d6178696d756d207075626c6963206d696e74696e670000600082015250565b6000614c4b601e83613d05565b9150614c5682614c15565b602082019050919050565b60006020820190508181036000830152614c7a81614c3e565b9050919050565b6000614c8c82613bc9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cbf57614cbe6143e6565b5b600182019050919050565b6000604082019050614cdf6000830185613e14565b614cec6020830184613eaa565b9392505050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000614d4f602b83613d05565b9150614d5a82614cf3565b604082019050919050565b60006020820190508181036000830152614d7e81614d42565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000614de1602c83613d05565b9150614dec82614d85565b604082019050919050565b60006020820190508181036000830152614e1081614dd4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000614e7c601883613d05565b9150614e8782614e46565b602082019050919050565b60006020820190508181036000830152614eab81614e6f565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000614f0e602983613d05565b9150614f1982614eb2565b604082019050919050565b60006020820190508181036000830152614f3d81614f01565b9050919050565b600081905092915050565b6000614f5a82613cfa565b614f648185614f44565b9350614f74818560208601613d16565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000614fb6600583614f44565b9150614fc182614f80565b600582019050919050565b6000614fd88284614f4f565b9150614fe382614fa9565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061504a602683613d05565b915061505582614fee565b604082019050919050565b600060208201905081810360008301526150798161503d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006150b6602083613d05565b91506150c182615080565b602082019050919050565b600060208201905081810360008301526150e5816150a9565b9050919050565b7f4552433732314d696e745061757361626c653a204d696e74206e6f742070617560008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b6000615148602383613d05565b9150615153826150ec565b604082019050919050565b600060208201905081810360008301526151778161513b565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006151da602583613d05565b91506151e58261517e565b604082019050919050565b60006020820190508181036000830152615209816151cd565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061526c602483613d05565b915061527782615210565b604082019050919050565b6000602082019050818103600083015261529b8161525f565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006152d8602083613d05565b91506152e3826152a2565b602082019050919050565b60006020820190508181036000830152615307816152cb565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615344601c83613d05565b915061534f8261530e565b602082019050919050565b6000602082019050818103600083015261537381615337565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006153b0601983613d05565b91506153bb8261537a565b602082019050919050565b600060208201905081810360008301526153df816153a3565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615442603283613d05565b915061544d826153e6565b604082019050919050565b6000602082019050818103600083015261547181615435565b9050919050565b60006154848285614f4f565b91506154908284614f4f565b91508190509392505050565b7f4552433732314d696e745061757361626c653a204d696e742070617573656400600082015250565b60006154d2601f83613d05565b91506154dd8261549c565b602082019050919050565b60006020820190508181036000830152615501816154c5565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061553e601483613d05565b915061554982615508565b602082019050919050565b6000602082019050818103600083015261556d81615531565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006155aa601083613d05565b91506155b582615574565b602082019050919050565b600060208201905081810360008301526155d98161559d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615607826155e0565b61561181856155eb565b9350615621818560208601613d16565b61562a81613d49565b840191505092915050565b600060808201905061564a6000830187613e14565b6156576020830186613e14565b6156646040830185613eaa565b818103606083015261567681846155fc565b905095945050505050565b60008151905061569081613c6b565b92915050565b6000602082840312156156ac576156ab613bbf565b5b60006156ba84828501615681565b91505092915050565b60006156ce82613bc9565b91506156d983613bc9565b9250826156e9576156e861446f565b5b828206905092915050565b7f4552433732314d696e745061757361626c653a204d696e74696e67206973206460008201527f697361626c656400000000000000000000000000000000000000000000000000602082015250565b6000615750602783613d05565b915061575b826156f4565b604082019050919050565b6000602082019050818103600083015261577f81615743565b9050919050565b7f4552433732315061757361626c653a20746f6b656e207472616e73666572207760008201527f68696c6520706175736564000000000000000000000000000000000000000000602082015250565b60006157e2602b83613d05565b91506157ed82615786565b604082019050919050565b60006020820190508181036000830152615811816157d5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220b415615fdbf3e6bbb54badc1ca3ab72fe1daab76b6de8d8a9556b43b080ae04864736f6c63430008090033", + "devdoc": { + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "burn(uint256)": { + "details": "Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1412, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_name", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 1414, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_symbol", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 1418, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_owners", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 1422, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_balances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1426, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_tokenApprovals", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 1432, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_operatorApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 2432, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_ownedTokens", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" + }, + { + "astId": 2436, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_ownedTokensIndex", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 2439, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_allTokens", + "offset": 0, + "slot": "8", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 2443, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_allTokensIndex", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 523, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_paused", + "offset": 0, + "slot": "10", + "type": "t_bool" + }, + { + "astId": 4443, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_mintingPaused", + "offset": 1, + "slot": "10", + "type": "t_bool" + }, + { + "astId": 400, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_owner", + "offset": 2, + "slot": "10", + "type": "t_address" + }, + { + "astId": 624, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_status", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 3465, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_tokenId", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 3467, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_baseTokenURI", + "offset": 0, + "slot": "13", + "type": "t_string_storage" + }, + { + "astId": 3472, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_publicSaleOpen", + "offset": 0, + "slot": "14", + "type": "t_bool" + }, + { + "astId": 3484, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "monetisation", + "offset": 1, + "slot": "14", + "type": "t_bool" + }, + { + "astId": 3487, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "commission", + "offset": 0, + "slot": "15", + "type": "t_uint256" + }, + { + "astId": 3492, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_ticketDetails", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_uint256,t_struct(TicketDetails)3481_storage)" + }, + { + "astId": 3533, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "_token", + "offset": 0, + "slot": "17", + "type": "t_contract(FestivalToken)4436" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(FestivalToken)4436": { + "encoding": "inplace", + "label": "contract FestivalToken", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_struct(TicketDetails)3481_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct FestivalNFT.TicketDetails)", + "numberOfBytes": "32", + "value": "t_struct(TicketDetails)3481_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(TicketDetails)3481_storage": { + "encoding": "inplace", + "label": "struct FestivalNFT.TicketDetails", + "members": [ + { + "astId": 3474, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "ticketOwner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3476, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "currentPrice", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 3478, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "sellingPrice", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 3480, + "contract": "contracts/FestivalNFT.sol:FestivalNFT", + "label": "forSale", + "offset": 0, + "slot": "3", + "type": "t_bool" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/festival-2ff2/FestivalToken.json b/deployments/festival-2ff2/FestivalToken.json new file mode 100644 index 0000000..85155ad --- /dev/null +++ b/deployments/festival-2ff2/FestivalToken.json @@ -0,0 +1,876 @@ +{ + "address": "0x2460668148DB97441b9beacfe93A0C6dB7632DA1", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x9ef4b570a1e627f680e9c6bc0618a42c70fa718769adc08a3016278425b8c8cd", + "receipt": { + "to": null, + "from": "0xe65e6686392C8a7570824738Cc4Fd23d4AB7df7d", + "contractAddress": "0x2460668148DB97441b9beacfe93A0C6dB7632DA1", + "transactionIndex": 13, + "gasUsed": "2486243", + "logsBloom": "0x00000004000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000008000000000000000000000000000000000000200000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008010000000000000000000000000000001000000000000000000002000000000200000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9614f1d8e161cd290139a80a6f0ca02fb4d821fc6bc87ba357c05d43ada9e1db", + "transactionHash": "0x9ef4b570a1e627f680e9c6bc0618a42c70fa718769adc08a3016278425b8c8cd", + "logs": [ + { + "transactionIndex": 13, + "blockNumber": 11412368, + "transactionHash": "0x9ef4b570a1e627f680e9c6bc0618a42c70fa718769adc08a3016278425b8c8cd", + "address": "0x2460668148DB97441b9beacfe93A0C6dB7632DA1", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e65e6686392c8a7570824738cc4fd23d4ab7df7d", + "0x000000000000000000000000e65e6686392c8a7570824738cc4fd23d4ab7df7d" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0x9614f1d8e161cd290139a80a6f0ca02fb4d821fc6bc87ba357c05d43ada9e1db" + }, + { + "transactionIndex": 13, + "blockNumber": 11412368, + "transactionHash": "0x9ef4b570a1e627f680e9c6bc0618a42c70fa718769adc08a3016278425b8c8cd", + "address": "0x2460668148DB97441b9beacfe93A0C6dB7632DA1", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e65e6686392c8a7570824738cc4fd23d4ab7df7d" + ], + "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "logIndex": 9, + "blockHash": "0x9614f1d8e161cd290139a80a6f0ca02fb4d821fc6bc87ba357c05d43ada9e1db" + } + ], + "blockNumber": 11412368, + "cumulativeGasUsed": "5257286", + "status": 1, + "byzantium": true + }, + "args": [ + "FestivalToken", + "FTK" + ], + "numDeployments": 1, + "solcInputHash": "f8c268d7ee2d00c0d95e6a0432c0ed1a", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, reducing the total supply. Emits a Transfer event with `to` set to the zero address. Requirements: - `account` cannot be the zero address. - `account` must have at least `amount` tokens.\",\"params\":{\"amount\":\"The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function\"}},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Creates `amount` tokens and assigns them to `account`, increasing the total supply. Emits a Transfer event with `from` set to the zero address. Requirements: - `account` cannot be the zero address. - `msg.sender` needs the DEFAULT_ADMIN_ROLE.\",\"params\":{\"amount\":\"The amount of tokens to mint, denominated by the decimals() function\",\"to\":\"The address to mint the new tokens into\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"pause()\":{\"details\":\"Triggers stopped state. Requirements: - The contract must not be paused. - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"unpause()\":{\"details\":\"Returns to normal state. Requirements: - The contract must be paused. - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\"}},\"title\":\"GenericToken\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract is a generic token adhering to the ERC20 standard, using the OpenZeppelin template libary for battletested functionality. It incorporates the standard ERC20 functions, enhanced with Minting and Burning, Pausable in case of emergencies and AccessControl for locking down the administrative functions. For demonstrative purposes, 1 million GT tokens are pre-mined to the address deploying this contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FestivalToken.sol\":\"FestivalToken\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\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 * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\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 value {ERC20} uses, unless this function is\\n * 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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 }\\n _balances[to] += amount;\\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 _balances[account] += amount;\\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 }\\n _totalSupply -= amount;\\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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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(\\n address owner,\\n address spender,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) 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(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"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/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.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\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 if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\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] = _HEX_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\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"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\"},\"contracts/FestivalToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// SettleMint.com\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @title GenericToken\\n * @notice This contract is a generic token adhering to the ERC20 standard,\\n * using the OpenZeppelin template libary for battletested functionality.\\n *\\n * It incorporates the standard ERC20 functions, enhanced with Minting\\n * and Burning, Pausable in case of emergencies and AccessControl for locking\\n * down the administrative functions.\\n *\\n * For demonstrative purposes, 1 million GT tokens are pre-mined to the address\\n * deploying this contract.\\n */\\ncontract FestivalToken is ERC165, ERC20, ERC20Burnable, Pausable, AccessControl {\\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _mint(msg.sender, 1000000 * 10**decimals());\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\\n return\\n interfaceId == type(IERC20).interfaceId ||\\n interfaceId == type(ERC20Burnable).interfaceId ||\\n interfaceId == type(Pausable).interfaceId ||\\n super.supportsInterface(interfaceId); // ERC165, AccessControl\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\\n */\\n function pause() public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _pause();\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\\n */\\n function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing 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 * - `msg.sender` needs the DEFAULT_ADMIN_ROLE.\\n *\\n * @param to The address to mint the new tokens into\\n * @param amount The amount of tokens to mint, denominated by the decimals() function\\n */\\n function mint(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n _mint(to, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the 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 * @param amount The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function\\n */\\n function burn(uint256 amount) public virtual override {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens 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 function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override whenNotPaused {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xbca1f4eef8b9b9871a00e1ba691ec5b92261e278afb8c55f1a5fe870ef3f7025\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620034c7380380620034c78339818101604052810190620000379190620006bb565b81818160039080519060200190620000519291906200046e565b5080600490805190602001906200006a9291906200046e565b5050506000600560006101000a81548160ff0219169083151502179055506200009d6000801b33620000e460201b60201c565b620000dc33620000b2620001d660201b60201c565b600a620000c09190620008da565b620f4240620000d091906200092b565b620001df60201b60201c565b505062000b71565b620000f682826200035860201b60201c565b620001d25760016006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555062000177620003c360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006012905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000252576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200024990620009ed565b60405180910390fd5b6200026660008383620003cb60201b60201c565b80600260008282546200027a919062000a0f565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254620002d1919062000a0f565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162000338919062000a7d565b60405180910390a36200035460008383620003f860201b60201c565b5050565b60006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b620003db620003fd60201b60201c565b620003f38383836200045260201b62000b0e1760201c565b505050565b505050565b6200040d6200045760201b60201c565b1562000450576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004479062000aea565b60405180910390fd5b565b505050565b6000600560009054906101000a900460ff16905090565b8280546200047c9062000b3b565b90600052602060002090601f016020900481019282620004a05760008555620004ec565b82601f10620004bb57805160ff1916838001178555620004ec565b82800160010185558215620004ec579182015b82811115620004eb578251825591602001919060010190620004ce565b5b509050620004fb9190620004ff565b5090565b5b808211156200051a57600081600090555060010162000500565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000587826200053c565b810181811067ffffffffffffffff82111715620005a957620005a86200054d565b5b80604052505050565b6000620005be6200051e565b9050620005cc82826200057c565b919050565b600067ffffffffffffffff821115620005ef57620005ee6200054d565b5b620005fa826200053c565b9050602081019050919050565b60005b83811015620006275780820151818401526020810190506200060a565b8381111562000637576000848401525b50505050565b6000620006546200064e84620005d1565b620005b2565b90508281526020810184848401111562000673576200067262000537565b5b6200068084828562000607565b509392505050565b600082601f830112620006a0576200069f62000532565b5b8151620006b28482602086016200063d565b91505092915050565b60008060408385031215620006d557620006d462000528565b5b600083015167ffffffffffffffff811115620006f657620006f56200052d565b5b620007048582860162000688565b925050602083015167ffffffffffffffff8111156200072857620007276200052d565b5b620007368582860162000688565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115620007ce57808604811115620007a657620007a562000740565b5b6001851615620007b65780820291505b8081029050620007c6856200076f565b945062000786565b94509492505050565b600082620007e95760019050620008bc565b81620007f95760009050620008bc565b81600181146200081257600281146200081d5762000853565b6001915050620008bc565b60ff84111562000832576200083162000740565b5b8360020a9150848211156200084c576200084b62000740565b5b50620008bc565b5060208310610133831016604e8410600b84101617156200088d5782820a90508381111562000887576200088662000740565b5b620008bc565b6200089c84848460016200077c565b92509050818404811115620008b657620008b562000740565b5b81810290505b9392505050565b6000819050919050565b600060ff82169050919050565b6000620008e782620008c3565b9150620008f483620008cd565b9250620009237fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484620007d7565b905092915050565b60006200093882620008c3565b91506200094583620008c3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161562000981576200098062000740565b5b828202905092915050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620009d5601f836200098c565b9150620009e2826200099d565b602082019050919050565b6000602082019050818103600083015262000a0881620009c6565b9050919050565b600062000a1c82620008c3565b915062000a2983620008c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000a615762000a6062000740565b5b828201905092915050565b62000a7781620008c3565b82525050565b600060208201905062000a94600083018462000a6c565b92915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600062000ad26010836200098c565b915062000adf8262000a9a565b602082019050919050565b6000602082019050818103600083015262000b058162000ac3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000b5457607f821691505b6020821081141562000b6b5762000b6a62000b0c565b5b50919050565b6129468062000b816000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806342966c68116100c357806395d89b411161007c57806395d89b41146103c5578063a217fddf146103e3578063a457c2d714610401578063a9059cbb14610431578063d547741f14610461578063dd62ed3e1461047d57610158565b806342966c68146103055780635c975abb1461032157806370a082311461033f57806379cc67901461036f5780638456cb591461038b57806391d148541461039557610158565b80632f2ff15d116101155780632f2ff15d14610259578063313ce5671461027557806336568abe1461029357806339509351146102af5780633f4ba83a146102df57806340c10f19146102e957610158565b806301ffc9a71461015d57806306fdde031461018d578063095ea7b3146101ab57806318160ddd146101db57806323b872dd146101f9578063248a9ca314610229575b600080fd5b61017760048036038101906101729190611a91565b6104ad565b6040516101849190611ad9565b60405180910390f35b6101956105f7565b6040516101a29190611b8d565b60405180910390f35b6101c560048036038101906101c09190611c43565b610689565b6040516101d29190611ad9565b60405180910390f35b6101e36106ac565b6040516101f09190611c92565b60405180910390f35b610213600480360381019061020e9190611cad565b6106b6565b6040516102209190611ad9565b60405180910390f35b610243600480360381019061023e9190611d36565b6106e5565b6040516102509190611d72565b60405180910390f35b610273600480360381019061026e9190611d8d565b610705565b005b61027d610726565b60405161028a9190611de9565b60405180910390f35b6102ad60048036038101906102a89190611d8d565b61072f565b005b6102c960048036038101906102c49190611c43565b6107b2565b6040516102d69190611ad9565b60405180910390f35b6102e76107e9565b005b61030360048036038101906102fe9190611c43565b610801565b005b61031f600480360381019061031a9190611e04565b61081d565b005b610329610831565b6040516103369190611ad9565b60405180910390f35b61035960048036038101906103549190611e31565b610848565b6040516103669190611c92565b60405180910390f35b61038960048036038101906103849190611c43565b610890565b005b6103936108b0565b005b6103af60048036038101906103aa9190611d8d565b6108c8565b6040516103bc9190611ad9565b60405180910390f35b6103cd610933565b6040516103da9190611b8d565b60405180910390f35b6103eb6109c5565b6040516103f89190611d72565b60405180910390f35b61041b60048036038101906104169190611c43565b6109cc565b6040516104289190611ad9565b60405180910390f35b61044b60048036038101906104469190611c43565b610a43565b6040516104589190611ad9565b60405180910390f35b61047b60048036038101906104769190611d8d565b610a66565b005b61049760048036038101906104929190611e5e565b610a87565b6040516104a49190611c92565b60405180910390f35b60007f36372b07000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057857507f3b5a0bf8000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105e057507f5c975abb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105f057506105ef82610b13565b5b9050919050565b60606003805461060690611ecd565b80601f016020809104026020016040519081016040528092919081815260200182805461063290611ecd565b801561067f5780601f106106545761010080835404028352916020019161067f565b820191906000526020600020905b81548152906001019060200180831161066257829003601f168201915b5050505050905090565b600080610694610b8d565b90506106a1818585610b95565b600191505092915050565b6000600254905090565b6000806106c1610b8d565b90506106ce858285610d60565b6106d9858585610dec565b60019150509392505050565b600060066000838152602001908152602001600020600101549050919050565b61070e826106e5565b6107178161106d565b6107218383611081565b505050565b60006012905090565b610737610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079b90611f71565b60405180910390fd5b6107ae8282611162565b5050565b6000806107bd610b8d565b90506107de8185856107cf8589610a87565b6107d99190611fc0565b610b95565b600191505092915050565b6000801b6107f68161106d565b6107fe611244565b50565b6000801b61080e8161106d565b61081883836112a7565b505050565b61082e610828610b8d565b82611407565b50565b6000600560009054906101000a900460ff16905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108a28261089c610b8d565b83610d60565b6108ac8282611407565b5050565b6000801b6108bd8161106d565b6108c56115de565b50565b60006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606004805461094290611ecd565b80601f016020809104026020016040519081016040528092919081815260200182805461096e90611ecd565b80156109bb5780601f10610990576101008083540402835291602001916109bb565b820191906000526020600020905b81548152906001019060200180831161099e57829003601f168201915b5050505050905090565b6000801b81565b6000806109d7610b8d565b905060006109e58286610a87565b905083811015610a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2190612088565b60405180910390fd5b610a378286868403610b95565b60019250505092915050565b600080610a4e610b8d565b9050610a5b818585610dec565b600191505092915050565b610a6f826106e5565b610a788161106d565b610a828383611162565b505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b865750610b8582611641565b5b9050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc9061211a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6c906121ac565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d539190611c92565b60405180910390a3505050565b6000610d6c8484610a87565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610de65781811015610dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcf90612218565b60405180910390fd5b610de58484848403610b95565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e53906122aa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ecc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec39061233c565b60405180910390fd5b610ed78383836116ab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f54906123ce565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ff09190611fc0565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110549190611c92565b60405180910390a36110678484846116c3565b50505050565b61107e81611079610b8d565b6116c8565b50565b61108b82826108c8565b61115e5760016006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611103610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61116c82826108c8565b156112405760006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506111e5610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61124c611765565b6000600560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611290610b8d565b60405161129d91906123fd565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90612464565b60405180910390fd5b611323600083836116ab565b80600260008282546113359190611fc0565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461138a9190611fc0565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516113ef9190611c92565b60405180910390a3611403600083836116c3565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146e906124f6565b60405180910390fd5b611483826000836116ab565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150090612588565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461156091906125a8565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115c59190611c92565b60405180910390a36115d9836000846116c3565b505050565b6115e66117ae565b6001600560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861162a610b8d565b60405161163791906123fd565b60405180910390a1565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6116b36117ae565b6116be838383610b0e565b505050565b505050565b6116d282826108c8565b611761576116f78173ffffffffffffffffffffffffffffffffffffffff1660146117f8565b6117058360001c60206117f8565b6040516020016117169291906126b0565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117589190611b8d565b60405180910390fd5b5050565b61176d610831565b6117ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a390612736565b60405180910390fd5b565b6117b6610831565b156117f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ed906127a2565b60405180910390fd5b565b60606000600283600261180b91906127c2565b6118159190611fc0565b67ffffffffffffffff81111561182e5761182d61281c565b5b6040519080825280601f01601f1916602001820160405280156118605781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106118985761189761284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106118fc576118fb61284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261193c91906127c2565b6119469190611fc0565b90505b60018111156119e6577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106119885761198761284b565b5b1a60f81b82828151811061199f5761199e61284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806119df9061287a565b9050611949565b5060008414611a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a21906128f0565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a6e81611a39565b8114611a7957600080fd5b50565b600081359050611a8b81611a65565b92915050565b600060208284031215611aa757611aa6611a34565b5b6000611ab584828501611a7c565b91505092915050565b60008115159050919050565b611ad381611abe565b82525050565b6000602082019050611aee6000830184611aca565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611b2e578082015181840152602081019050611b13565b83811115611b3d576000848401525b50505050565b6000601f19601f8301169050919050565b6000611b5f82611af4565b611b698185611aff565b9350611b79818560208601611b10565b611b8281611b43565b840191505092915050565b60006020820190508181036000830152611ba78184611b54565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611bda82611baf565b9050919050565b611bea81611bcf565b8114611bf557600080fd5b50565b600081359050611c0781611be1565b92915050565b6000819050919050565b611c2081611c0d565b8114611c2b57600080fd5b50565b600081359050611c3d81611c17565b92915050565b60008060408385031215611c5a57611c59611a34565b5b6000611c6885828601611bf8565b9250506020611c7985828601611c2e565b9150509250929050565b611c8c81611c0d565b82525050565b6000602082019050611ca76000830184611c83565b92915050565b600080600060608486031215611cc657611cc5611a34565b5b6000611cd486828701611bf8565b9350506020611ce586828701611bf8565b9250506040611cf686828701611c2e565b9150509250925092565b6000819050919050565b611d1381611d00565b8114611d1e57600080fd5b50565b600081359050611d3081611d0a565b92915050565b600060208284031215611d4c57611d4b611a34565b5b6000611d5a84828501611d21565b91505092915050565b611d6c81611d00565b82525050565b6000602082019050611d876000830184611d63565b92915050565b60008060408385031215611da457611da3611a34565b5b6000611db285828601611d21565b9250506020611dc385828601611bf8565b9150509250929050565b600060ff82169050919050565b611de381611dcd565b82525050565b6000602082019050611dfe6000830184611dda565b92915050565b600060208284031215611e1a57611e19611a34565b5b6000611e2884828501611c2e565b91505092915050565b600060208284031215611e4757611e46611a34565b5b6000611e5584828501611bf8565b91505092915050565b60008060408385031215611e7557611e74611a34565b5b6000611e8385828601611bf8565b9250506020611e9485828601611bf8565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611ee557607f821691505b60208210811415611ef957611ef8611e9e565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000611f5b602f83611aff565b9150611f6682611eff565b604082019050919050565b60006020820190508181036000830152611f8a81611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fcb82611c0d565b9150611fd683611c0d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561200b5761200a611f91565b5b828201905092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612072602583611aff565b915061207d82612016565b604082019050919050565b600060208201905081810360008301526120a181612065565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612104602483611aff565b915061210f826120a8565b604082019050919050565b60006020820190508181036000830152612133816120f7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612196602283611aff565b91506121a18261213a565b604082019050919050565b600060208201905081810360008301526121c581612189565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612202601d83611aff565b915061220d826121cc565b602082019050919050565b60006020820190508181036000830152612231816121f5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612294602583611aff565b915061229f82612238565b604082019050919050565b600060208201905081810360008301526122c381612287565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612326602383611aff565b9150612331826122ca565b604082019050919050565b6000602082019050818103600083015261235581612319565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006123b8602683611aff565b91506123c38261235c565b604082019050919050565b600060208201905081810360008301526123e7816123ab565b9050919050565b6123f781611bcf565b82525050565b600060208201905061241260008301846123ee565b92915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061244e601f83611aff565b915061245982612418565b602082019050919050565b6000602082019050818103600083015261247d81612441565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006124e0602183611aff565b91506124eb82612484565b604082019050919050565b6000602082019050818103600083015261250f816124d3565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000612572602283611aff565b915061257d82612516565b604082019050919050565b600060208201905081810360008301526125a181612565565b9050919050565b60006125b382611c0d565b91506125be83611c0d565b9250828210156125d1576125d0611f91565b5b828203905092915050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061261d6017836125dc565b9150612628826125e7565b601782019050919050565b600061263e82611af4565b61264881856125dc565b9350612658818560208601611b10565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061269a6011836125dc565b91506126a582612664565b601182019050919050565b60006126bb82612610565b91506126c78285612633565b91506126d28261268d565b91506126de8284612633565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612720601483611aff565b915061272b826126ea565b602082019050919050565b6000602082019050818103600083015261274f81612713565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061278c601083611aff565b915061279782612756565b602082019050919050565b600060208201905081810360008301526127bb8161277f565b9050919050565b60006127cd82611c0d565b91506127d883611c0d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561281157612810611f91565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061288582611c0d565b9150600082141561289957612898611f91565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006128da602083611aff565b91506128e5826128a4565b602082019050919050565b60006020820190508181036000830152612909816128cd565b905091905056fea264697066735822122076bdac2e8151e6533ace2e0ce820b53e0dcf39a3a9809490e28da42a1ad2c14a64736f6c63430008090033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101585760003560e01c806342966c68116100c357806395d89b411161007c57806395d89b41146103c5578063a217fddf146103e3578063a457c2d714610401578063a9059cbb14610431578063d547741f14610461578063dd62ed3e1461047d57610158565b806342966c68146103055780635c975abb1461032157806370a082311461033f57806379cc67901461036f5780638456cb591461038b57806391d148541461039557610158565b80632f2ff15d116101155780632f2ff15d14610259578063313ce5671461027557806336568abe1461029357806339509351146102af5780633f4ba83a146102df57806340c10f19146102e957610158565b806301ffc9a71461015d57806306fdde031461018d578063095ea7b3146101ab57806318160ddd146101db57806323b872dd146101f9578063248a9ca314610229575b600080fd5b61017760048036038101906101729190611a91565b6104ad565b6040516101849190611ad9565b60405180910390f35b6101956105f7565b6040516101a29190611b8d565b60405180910390f35b6101c560048036038101906101c09190611c43565b610689565b6040516101d29190611ad9565b60405180910390f35b6101e36106ac565b6040516101f09190611c92565b60405180910390f35b610213600480360381019061020e9190611cad565b6106b6565b6040516102209190611ad9565b60405180910390f35b610243600480360381019061023e9190611d36565b6106e5565b6040516102509190611d72565b60405180910390f35b610273600480360381019061026e9190611d8d565b610705565b005b61027d610726565b60405161028a9190611de9565b60405180910390f35b6102ad60048036038101906102a89190611d8d565b61072f565b005b6102c960048036038101906102c49190611c43565b6107b2565b6040516102d69190611ad9565b60405180910390f35b6102e76107e9565b005b61030360048036038101906102fe9190611c43565b610801565b005b61031f600480360381019061031a9190611e04565b61081d565b005b610329610831565b6040516103369190611ad9565b60405180910390f35b61035960048036038101906103549190611e31565b610848565b6040516103669190611c92565b60405180910390f35b61038960048036038101906103849190611c43565b610890565b005b6103936108b0565b005b6103af60048036038101906103aa9190611d8d565b6108c8565b6040516103bc9190611ad9565b60405180910390f35b6103cd610933565b6040516103da9190611b8d565b60405180910390f35b6103eb6109c5565b6040516103f89190611d72565b60405180910390f35b61041b60048036038101906104169190611c43565b6109cc565b6040516104289190611ad9565b60405180910390f35b61044b60048036038101906104469190611c43565b610a43565b6040516104589190611ad9565b60405180910390f35b61047b60048036038101906104769190611d8d565b610a66565b005b61049760048036038101906104929190611e5e565b610a87565b6040516104a49190611c92565b60405180910390f35b60007f36372b07000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057857507f3b5a0bf8000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105e057507f5c975abb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806105f057506105ef82610b13565b5b9050919050565b60606003805461060690611ecd565b80601f016020809104026020016040519081016040528092919081815260200182805461063290611ecd565b801561067f5780601f106106545761010080835404028352916020019161067f565b820191906000526020600020905b81548152906001019060200180831161066257829003601f168201915b5050505050905090565b600080610694610b8d565b90506106a1818585610b95565b600191505092915050565b6000600254905090565b6000806106c1610b8d565b90506106ce858285610d60565b6106d9858585610dec565b60019150509392505050565b600060066000838152602001908152602001600020600101549050919050565b61070e826106e5565b6107178161106d565b6107218383611081565b505050565b60006012905090565b610737610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079b90611f71565b60405180910390fd5b6107ae8282611162565b5050565b6000806107bd610b8d565b90506107de8185856107cf8589610a87565b6107d99190611fc0565b610b95565b600191505092915050565b6000801b6107f68161106d565b6107fe611244565b50565b6000801b61080e8161106d565b61081883836112a7565b505050565b61082e610828610b8d565b82611407565b50565b6000600560009054906101000a900460ff16905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108a28261089c610b8d565b83610d60565b6108ac8282611407565b5050565b6000801b6108bd8161106d565b6108c56115de565b50565b60006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606004805461094290611ecd565b80601f016020809104026020016040519081016040528092919081815260200182805461096e90611ecd565b80156109bb5780601f10610990576101008083540402835291602001916109bb565b820191906000526020600020905b81548152906001019060200180831161099e57829003601f168201915b5050505050905090565b6000801b81565b6000806109d7610b8d565b905060006109e58286610a87565b905083811015610a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2190612088565b60405180910390fd5b610a378286868403610b95565b60019250505092915050565b600080610a4e610b8d565b9050610a5b818585610dec565b600191505092915050565b610a6f826106e5565b610a788161106d565b610a828383611162565b505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b865750610b8582611641565b5b9050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc9061211a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6c906121ac565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d539190611c92565b60405180910390a3505050565b6000610d6c8484610a87565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610de65781811015610dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcf90612218565b60405180910390fd5b610de58484848403610b95565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e53906122aa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ecc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec39061233c565b60405180910390fd5b610ed78383836116ab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f54906123ce565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ff09190611fc0565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110549190611c92565b60405180910390a36110678484846116c3565b50505050565b61107e81611079610b8d565b6116c8565b50565b61108b82826108c8565b61115e5760016006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611103610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61116c82826108c8565b156112405760006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506111e5610b8d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61124c611765565b6000600560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611290610b8d565b60405161129d91906123fd565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130e90612464565b60405180910390fd5b611323600083836116ab565b80600260008282546113359190611fc0565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461138a9190611fc0565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516113ef9190611c92565b60405180910390a3611403600083836116c3565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146e906124f6565b60405180910390fd5b611483826000836116ab565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150090612588565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002600082825461156091906125a8565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115c59190611c92565b60405180910390a36115d9836000846116c3565b505050565b6115e66117ae565b6001600560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861162a610b8d565b60405161163791906123fd565b60405180910390a1565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6116b36117ae565b6116be838383610b0e565b505050565b505050565b6116d282826108c8565b611761576116f78173ffffffffffffffffffffffffffffffffffffffff1660146117f8565b6117058360001c60206117f8565b6040516020016117169291906126b0565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117589190611b8d565b60405180910390fd5b5050565b61176d610831565b6117ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a390612736565b60405180910390fd5b565b6117b6610831565b156117f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ed906127a2565b60405180910390fd5b565b60606000600283600261180b91906127c2565b6118159190611fc0565b67ffffffffffffffff81111561182e5761182d61281c565b5b6040519080825280601f01601f1916602001820160405280156118605781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106118985761189761284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106118fc576118fb61284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261193c91906127c2565b6119469190611fc0565b90505b60018111156119e6577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106119885761198761284b565b5b1a60f81b82828151811061199f5761199e61284b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806119df9061287a565b9050611949565b5060008414611a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a21906128f0565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a6e81611a39565b8114611a7957600080fd5b50565b600081359050611a8b81611a65565b92915050565b600060208284031215611aa757611aa6611a34565b5b6000611ab584828501611a7c565b91505092915050565b60008115159050919050565b611ad381611abe565b82525050565b6000602082019050611aee6000830184611aca565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611b2e578082015181840152602081019050611b13565b83811115611b3d576000848401525b50505050565b6000601f19601f8301169050919050565b6000611b5f82611af4565b611b698185611aff565b9350611b79818560208601611b10565b611b8281611b43565b840191505092915050565b60006020820190508181036000830152611ba78184611b54565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611bda82611baf565b9050919050565b611bea81611bcf565b8114611bf557600080fd5b50565b600081359050611c0781611be1565b92915050565b6000819050919050565b611c2081611c0d565b8114611c2b57600080fd5b50565b600081359050611c3d81611c17565b92915050565b60008060408385031215611c5a57611c59611a34565b5b6000611c6885828601611bf8565b9250506020611c7985828601611c2e565b9150509250929050565b611c8c81611c0d565b82525050565b6000602082019050611ca76000830184611c83565b92915050565b600080600060608486031215611cc657611cc5611a34565b5b6000611cd486828701611bf8565b9350506020611ce586828701611bf8565b9250506040611cf686828701611c2e565b9150509250925092565b6000819050919050565b611d1381611d00565b8114611d1e57600080fd5b50565b600081359050611d3081611d0a565b92915050565b600060208284031215611d4c57611d4b611a34565b5b6000611d5a84828501611d21565b91505092915050565b611d6c81611d00565b82525050565b6000602082019050611d876000830184611d63565b92915050565b60008060408385031215611da457611da3611a34565b5b6000611db285828601611d21565b9250506020611dc385828601611bf8565b9150509250929050565b600060ff82169050919050565b611de381611dcd565b82525050565b6000602082019050611dfe6000830184611dda565b92915050565b600060208284031215611e1a57611e19611a34565b5b6000611e2884828501611c2e565b91505092915050565b600060208284031215611e4757611e46611a34565b5b6000611e5584828501611bf8565b91505092915050565b60008060408385031215611e7557611e74611a34565b5b6000611e8385828601611bf8565b9250506020611e9485828601611bf8565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611ee557607f821691505b60208210811415611ef957611ef8611e9e565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000611f5b602f83611aff565b9150611f6682611eff565b604082019050919050565b60006020820190508181036000830152611f8a81611f4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fcb82611c0d565b9150611fd683611c0d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561200b5761200a611f91565b5b828201905092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612072602583611aff565b915061207d82612016565b604082019050919050565b600060208201905081810360008301526120a181612065565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612104602483611aff565b915061210f826120a8565b604082019050919050565b60006020820190508181036000830152612133816120f7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612196602283611aff565b91506121a18261213a565b604082019050919050565b600060208201905081810360008301526121c581612189565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612202601d83611aff565b915061220d826121cc565b602082019050919050565b60006020820190508181036000830152612231816121f5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612294602583611aff565b915061229f82612238565b604082019050919050565b600060208201905081810360008301526122c381612287565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612326602383611aff565b9150612331826122ca565b604082019050919050565b6000602082019050818103600083015261235581612319565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006123b8602683611aff565b91506123c38261235c565b604082019050919050565b600060208201905081810360008301526123e7816123ab565b9050919050565b6123f781611bcf565b82525050565b600060208201905061241260008301846123ee565b92915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061244e601f83611aff565b915061245982612418565b602082019050919050565b6000602082019050818103600083015261247d81612441565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006124e0602183611aff565b91506124eb82612484565b604082019050919050565b6000602082019050818103600083015261250f816124d3565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000612572602283611aff565b915061257d82612516565b604082019050919050565b600060208201905081810360008301526125a181612565565b9050919050565b60006125b382611c0d565b91506125be83611c0d565b9250828210156125d1576125d0611f91565b5b828203905092915050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061261d6017836125dc565b9150612628826125e7565b601782019050919050565b600061263e82611af4565b61264881856125dc565b9350612658818560208601611b10565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061269a6011836125dc565b91506126a582612664565b601182019050919050565b60006126bb82612610565b91506126c78285612633565b91506126d28261268d565b91506126de8284612633565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612720601483611aff565b915061272b826126ea565b602082019050919050565b6000602082019050818103600083015261274f81612713565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061278c601083611aff565b915061279782612756565b602082019050919050565b600060208201905081810360008301526127bb8161277f565b9050919050565b60006127cd82611c0d565b91506127d883611c0d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561281157612810611f91565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061288582611c0d565b9150600082141561289957612898611f91565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006128da602083611aff565b91506128e5826128a4565b602082019050919050565b60006020820190508181036000830152612909816128cd565b905091905056fea264697066735822122076bdac2e8151e6533ace2e0ce820b53e0dcf39a3a9809490e28da42a1ad2c14a64736f6c63430008090033", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from `account`, reducing the total supply. Emits a Transfer event with `to` set to the zero address. Requirements: - `account` cannot be the zero address. - `account` must have at least `amount` tokens.", + "params": { + "amount": "The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function" + } + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "details": "Creates `amount` tokens and assigns them to `account`, increasing the total supply. Emits a Transfer event with `from` set to the zero address. Requirements: - `account` cannot be the zero address. - `msg.sender` needs the DEFAULT_ADMIN_ROLE.", + "params": { + "amount": "The amount of tokens to mint, denominated by the decimals() function", + "to": "The address to mint the new tokens into" + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "pause()": { + "details": "Triggers stopped state. Requirements: - The contract must not be paused. - The sender of the transaction must have the DEFAULT_ADMIN_ROLE" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "unpause()": { + "details": "Returns to normal state. Requirements: - The contract must be paused. - The sender of the transaction must have the DEFAULT_ADMIN_ROLE" + } + }, + "title": "GenericToken", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract is a generic token adhering to the ERC20 standard, using the OpenZeppelin template libary for battletested functionality. It incorporates the standard ERC20 functions, enhanced with Minting and Burning, Pausable in case of emergencies and AccessControl for locking down the administrative functions. For demonstrative purposes, 1 million GT tokens are pre-mined to the address deploying this contract.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 669, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 675, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 677, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 679, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 681, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 523, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_paused", + "offset": 0, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 24, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "_roles", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)19_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)19_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 16, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 18, + "contract": "contracts/FestivalToken.sol:FestivalToken", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/festival-2ff2/solcInputs/589f93bfe56eb287c3206c067720a113.json b/deployments/festival-2ff2/solcInputs/589f93bfe56eb287c3206c067720a113.json new file mode 100644 index 0000000..501d7e2 --- /dev/null +++ b/deployments/festival-2ff2/solcInputs/589f93bfe56eb287c3206c067720a113.json @@ -0,0 +1,107 @@ +{ + "language": "Solidity", + "sources": { + "contracts/FestivalNFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com , Elton Tay\n\npragma solidity ^0.8.9;\n\n// Removed opensea, reserves, whitelist, royalty, freeze, batch\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"./library/token/ERC721/extensions/ERC721MintPausable.sol\";\n// Additional import\nimport \"./FestivalToken.sol\";\n\ncontract FestivalNFT is\n ERC721Enumerable,\n ERC721Burnable,\n ERC721Pausable,\n ERC721MintPausable,\n Ownable,\n ReentrancyGuard\n{\n //////////////////////////////////////////////////////////////////\n // CONFIGURATION //\n //////////////////////////////////////////////////////////////////\n uint256 public constant PRICE = 10 * 10 ** 18; // Price per Festival NFT, set at 10 FTK\n uint256 public constant MAX_PER_TX = 5; // Limiting to 5 for family purchase of FNFTs\n uint256 public constant MAX_SUPPLY = 1000; // Total amount of FNFTs\n\n //////////////////////////////////////////////////////////////////\n // TOKEN STORAGE //\n //////////////////////////////////////////////////////////////////\n\n uint256 private _tokenId;\n string private _baseTokenURI; // the IPFS url to the folder holding the metadata.\n\n //////////////////////////////////////////////////////////////////\n // CROWDSALE STORAGE //\n //////////////////////////////////////////////////////////////////\n\n address payable private immutable _organiser; // address of the festival owner\n bool private _publicSaleOpen = false; // is the public sale open?\n\n //////////////////////////////////////////////////////////////////\n // FESTIVAL DETAILS //\n //////////////////////////////////////////////////////////////////\n\n // Structure of each ticket\n struct TicketDetails {\n address ticketOwner;\n uint256 currentPrice;\n uint256 sellingPrice;\n bool forSale;\n }\n\n bool private monetisation = false; // default monetisation (commision) set to false\n uint256 private commission = 0; // default commission value set to 0\n mapping(uint256 => TicketDetails) private _ticketDetails; // mapping structure of ticket to each ticket\n\n // events\n event PublicMint(address buyer, uint256 ticketId);\n event PurchaseListing(address buyer, address seller, uint256 sellingPrice, uint256 commissionPrice);\n event SetListing(address owner, uint256 ticketId, uint256 sellingPrice);\n event RemoveListing(address owner, uint256 ticketId);\n event AdjustListing(address owner, uint256 ticketId, uint256 sellingPrice);\n\n FestivalToken private _token;\n\n constructor(\n string memory name_,\n string memory symbol_,\n string memory baseTokenURI_,\n FestivalToken token_\n ) ERC721(name_, symbol_) {\n _baseTokenURI = baseTokenURI_;\n _organiser = payable(_msgSender());\n _token = token_;\n }\n\n //////////////////////////////////////////////////////////////////\n // CORE FUNCTIONS //\n //////////////////////////////////////////////////////////////////\n\n function setBaseURI(string memory baseTokenURI_) public onlyOwner {\n _baseTokenURI = baseTokenURI_;\n }\n\n function _baseURI() internal view override returns (string memory) {\n return _baseTokenURI;\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n string memory tokenUri = super.tokenURI(tokenId);\n return bytes(tokenUri).length > 0 ? string(abi.encodePacked(tokenUri, \".json\")) : \"\";\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal override(ERC721, ERC721Enumerable, ERC721Pausable, ERC721MintPausable) {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal override(ERC721) {\n super._afterTokenTransfer(from, to, tokenId);\n }\n\n //////////////////////////////////////////////////////////////////\n // PUBLIC SALE //\n //////////////////////////////////////////////////////////////////\n\n function startPublicSale() public onlyOwner {\n _publicSaleOpen = true;\n }\n\n function publicMint(uint256 count) public payable nonReentrant {\n require(_publicSaleOpen, \"Public sale not active\");\n require(_tokenId + count <= MAX_SUPPLY, \"Exceeds max supply\");\n require(count <= MAX_PER_TX, \"Exceeds max per transaction\");\n require(balanceOf(_msgSender()) + count <= MAX_PER_TX, \"Exceeds maximum public minting\");\n _token.transferFrom(_msgSender(),_organiser, count * PRICE); // Error will throw if insufficient funds\n\n for (uint256 i; i < count; i++) {\n _mint(_msgSender(), ++_tokenId);\n _ticketDetails[_tokenId] = TicketDetails({ // initialise structure to ticket\n ticketOwner: _msgSender(),\n currentPrice: PRICE,\n sellingPrice: 0,\n forSale: false\n });\n emit PublicMint(_msgSender(),_tokenId);\n }\n\n\n }\n\n //////////////////////////////////////////////////////////////////\n // POST SALE MANAGEMENT //\n //////////////////////////////////////////////////////////////////\n\n function withdraw() public {\n _organiser.transfer(address(this).balance);\n }\n\n function wallet() public view returns (address) {\n return _organiser;\n }\n\n function _burn(uint256 tokenId) internal override(ERC721) {\n super._burn(tokenId);\n }\n\n function burn(uint256 tokenId) public override {\n _burn(tokenId);\n }\n\n\n //////////////////////////////////////////////////////////////////\n // Pausable & MintPausable //\n //////////////////////////////////////////////////////////////////\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function pauseMint() public onlyOwner {\n _pauseMint();\n }\n\n function unpauseMint() public onlyOwner {\n _unpauseMint();\n }\n\n //////////////////////////////////////////////////////////////////\n // ERC165 //\n //////////////////////////////////////////////////////////////////\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {\n return\n interfaceId == type(Ownable).interfaceId ||\n interfaceId == type(ERC721Burnable).interfaceId ||\n interfaceId == type(ERC721Enumerable).interfaceId ||\n interfaceId == type(ERC721MintPausable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n //////////////////////////////////////////////////////////////////\n // Festival Functions //\n //////////////////////////////////////////////////////////////////\n\n //////////////////////////////////////////////////////////////////\n // Modifier Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n Modifier - Validate that the selling price does not exceed 110% (1.1x) more than the\n current price.\n */\n\n modifier checkSellingPrice(uint256 ticketId, uint256 sellingPrice) {\n uint256 currentPrice = _ticketDetails[ticketId].currentPrice;\n require(\n sellingPrice <= ((currentPrice * 110) / 100),\n \"Re-selling price is more than 110%\"\n );\n _;\n }\n\n /*\n Modifier - Check msg sender is ticket owner\n */\n\n modifier checkTicketIsOwner(uint256 ticketId, address ticketOwner) {\n address realOwner = _ticketDetails[ticketId].ticketOwner;\n require(realOwner == ticketOwner, \"You are not the ticket owner.\");\n _;\n }\n\n /*\n Modifier - Check msg sender is not ticket owner\n */\n\n modifier checkTicketIsNotOwner(uint256 ticketId, address ticketOwner) {\n address realOwner = _ticketDetails[ticketId].ticketOwner;\n require(realOwner != ticketOwner, \"You are the ticket owner.\");\n _;\n }\n\n /*\n Modifier - Check if ticket is on sale\n */\n\n modifier checkTicketOnSale(uint256 ticketId) {\n require(_ticketDetails[ticketId].forSale, \"Ticket is not on sale.\");\n _;\n }\n\n /*\n Modifier - Check if ticket is not on sale\n */\n\n modifier checkTicketNotOnSale(uint256 ticketId) {\n require(!_ticketDetails[ticketId].forSale, \"Ticket is on sale.\");\n _;\n }\n\n /*\n Modifier - Check if value is sufficient for ticket purchase\n */\n\n modifier checkSufficientValue(uint256 ticketId, uint256 value) {\n require(value >= _ticketDetails[ticketId].sellingPrice, \"Insufficient token for purchase.\");\n _;\n }\n\n //////////////////////////////////////////////////////////////////\n // Secondary Marketplace Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n List ticket on secondary market.\n - Checks selling price validity\n - Checks ticket owner is msg sender\n - Checks ticket is not on sale\n */\n\n function setListing(uint256 ticketId, uint256 sellingPrice_)\n public\n checkSellingPrice(ticketId, sellingPrice_)\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketNotOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\n _ticketDetails[ticketId].forSale = true;\n\n emit SetListing(_msgSender(),ticketId,sellingPrice_);\n }\n\n /*\n Remove ticket listing on secondary market.\n - Checks ticket owner is msg sender\n - Checks if ticket is on sale\n */\n\n function removeListing(uint256 ticketId)\n public\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = 0;\n _ticketDetails[ticketId].forSale = false;\n\n emit RemoveListing(_msgSender(),ticketId);\n }\n\n /*\n Adjust ticket listing on secondary market.\n - Checks selling price validity\n - Checks ticket owner is msg sender\n - Checks if ticket is on sale\n */\n\n function adjustListing(uint256 ticketId, uint256 sellingPrice_)\n public\n checkSellingPrice(ticketId, sellingPrice_)\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\n\n emit AdjustListing(_msgSender(),ticketId,sellingPrice_);\n }\n\n /*\n Buy ticket listing on secondary market.\n - Check sufficient buying power\n - Check ticket owner is not msg sender\n - Checks if ticket is on sale\n */\n\n function purchaseListing(uint256 ticketId, uint256 value)\n public\n payable\n checkSufficientValue(ticketId, value)\n checkTicketIsNotOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n\n address seller = _ticketDetails[ticketId].ticketOwner;\n uint256 sellingPrice = _ticketDetails[ticketId].sellingPrice;\n uint256 commissionPrice = (sellingPrice * commission) / 100;\n // Transferring of Tokens\n _token.transferFrom(_msgSender(), seller, sellingPrice - commissionPrice);\n if (commissionPrice > 0) {\n _token.transferFrom(_msgSender(), _organiser, commissionPrice);\n }\n\n // Transferring of NFT\n this.transferFrom(seller, _msgSender(), ticketId);\n\n // Adjust ticket details\n _ticketDetails[ticketId].ticketOwner = _msgSender();\n _ticketDetails[ticketId].currentPrice = sellingPrice;\n _ticketDetails[ticketId].forSale = false;\n\n emit PurchaseListing(_msgSender(),seller,sellingPrice,commissionPrice);\n }\n\n //////////////////////////////////////////////////////////////////\n // Owner Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n Monetisation option\n Input in whole numbers - E.g. 10% = 10, 100% = 100\n Limitation range : 0 - 100\n */\n function monetise(uint256 commissionPercentage) public onlyOwner {\n commission = commissionPercentage;\n }\n\n //////////////////////////////////////////////////////////////////\n // Getter Functions //\n //////////////////////////////////////////////////////////////////\n\n function getCurrentPrice(uint256 ticketId) public view returns (uint256) {\n return _ticketDetails[ticketId].currentPrice;\n }\n\n function getSellingPrice(uint256 ticketId) public view returns (uint256) {\n return _ticketDetails[ticketId].sellingPrice;\n }\n\n function getForSale(uint256 ticketId) public view returns (bool) {\n return _ticketDetails[ticketId].forSale;\n }\n\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721MintPausable.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\nabstract contract ERC721MintPausable is ERC721 {\n bool private _mintingPaused;\n\n event MintPaused(address account);\n event MintUnpaused(address account);\n\n modifier whenMintNotPaused() {\n require(!mintPaused(), \"ERC721MintPausable: Mint paused\");\n _;\n }\n\n modifier whenMintPaused() {\n require(mintPaused(), \"ERC721MintPausable: Mint not paused\");\n _;\n }\n\n constructor() {\n _mintingPaused = false;\n }\n\n function mintPaused() public view returns (bool) {\n return _mintingPaused;\n }\n\n function _pauseMint() internal virtual whenMintNotPaused {\n _mintingPaused = true;\n }\n\n function _unpauseMint() internal virtual whenMintPaused {\n _mintingPaused = false;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n require((!mintPaused() || from != address(0)), \"ERC721MintPausable: Minting is disabled\");\n }\n}\n" + }, + "contracts/FestivalToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/security/Pausable.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * @title GenericToken\n * @notice This contract is a generic token adhering to the ERC20 standard,\n * using the OpenZeppelin template libary for battletested functionality.\n *\n * It incorporates the standard ERC20 functions, enhanced with Minting\n * and Burning, Pausable in case of emergencies and AccessControl for locking\n * down the administrative functions.\n *\n * For demonstrative purposes, 1 million GT tokens are pre-mined to the address\n * deploying this contract.\n */\ncontract FestivalToken is ERC165, ERC20, ERC20Burnable, Pausable, AccessControl {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _mint(msg.sender, 1000000 * 10**decimals());\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n interfaceId == type(ERC20Burnable).interfaceId ||\n interfaceId == type(Pausable).interfaceId ||\n super.supportsInterface(interfaceId); // ERC165, AccessControl\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\n */\n function pause() public onlyRole(DEFAULT_ADMIN_ROLE) {\n _pause();\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\n */\n function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) {\n _unpause();\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing 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 * - `msg.sender` needs the DEFAULT_ADMIN_ROLE.\n *\n * @param to The address to mint the new tokens into\n * @param amount The amount of tokens to mint, denominated by the decimals() function\n */\n function mint(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n _mint(to, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the 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 * @param amount The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function\n */\n function burn(uint256 amount) public virtual override {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens 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 function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override whenNotPaused {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing 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/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 nor approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC721 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC721Pausable is ERC721, Pausable {\n /**\n * @dev See {ERC721-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n require(!paused(), \"ERC721Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 = _owners[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 nor 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(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor 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(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) 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 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 _owners[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(\n address to,\n uint256 tokenId,\n bytes memory data\n ) 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);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\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);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId);\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(\n address from,\n address to,\n uint256 tokenId\n ) 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);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId);\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(\n address owner,\n address operator,\n bool approved\n ) 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\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` 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(\n address from,\n address to,\n uint256 tokenId\n ) 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.\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(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\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/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_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" + }, + "@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/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 *\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) 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(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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(\n address from,\n address to,\n uint256 tokenId\n ) 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/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/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/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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 }\n _balances[to] += amount;\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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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(\n address owner,\n address spender,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\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/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/festival-2ff2/solcInputs/f8c268d7ee2d00c0d95e6a0432c0ed1a.json b/deployments/festival-2ff2/solcInputs/f8c268d7ee2d00c0d95e6a0432c0ed1a.json new file mode 100644 index 0000000..ecfb63a --- /dev/null +++ b/deployments/festival-2ff2/solcInputs/f8c268d7ee2d00c0d95e6a0432c0ed1a.json @@ -0,0 +1,158 @@ +{ + "language": "Solidity", + "sources": { + "contracts/FestivalNFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com , Elton Tay\n\npragma solidity ^0.8.9;\n\n// Removed opensea, reserves, whitelist, royalty\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"./library/token/ERC721/extensions/ERC721Freezable.sol\";\nimport \"./library/token/ERC721/extensions/ERC721MintPausable.sol\";\nimport \"./library/token/ERC721/extensions/ERC721Batch.sol\";\n// Additional import\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport \"./FestivalToken.sol\";\n\ncontract FestivalNFT is\n ERC721Enumerable,\n ERC721Burnable,\n ERC721Pausable,\n ERC721Freezable,\n ERC721MintPausable,\n ERC721Batch,\n Ownable,\n ReentrancyGuard\n{\n //////////////////////////////////////////////////////////////////\n // CONFIGURATION //\n //////////////////////////////////////////////////////////////////\n uint256 public constant PRICE = 10; // Price per Festival NFT\n uint256 public constant MAX_PER_TX = 5; // Limiting to 5 for family purchase of Festival NFTs\n uint256 public constant MAX_SUPPLY = 1000; // Total amount of Festival NFTs\n\n //////////////////////////////////////////////////////////////////\n // TOKEN STORAGE //\n //////////////////////////////////////////////////////////////////\n\n uint256 private _tokenId;\n string private _baseTokenURI; // the IPFS url to the folder holding the metadata.\n\n //////////////////////////////////////////////////////////////////\n // CROWDSALE STORAGE //\n //////////////////////////////////////////////////////////////////\n\n address payable private immutable _organiser; // address of the festival owner\n bool private _publicSaleOpen = false; // is the public sale open?\n\n //////////////////////////////////////////////////////////////////\n // FESTIVAL DETAILS //\n //////////////////////////////////////////////////////////////////\n\n // Structure of each ticket\n struct TicketDetails {\n address ticketOwner;\n uint256 currentPrice;\n uint256 sellingPrice;\n bool forSale;\n }\n\n bool private monetisation = false; // default monetisation (commision) set to false\n uint256 private commission = 0; // default commission value set to 0\n address[] private buyers; // list of buyers\n uint256[] private ticketsOnSale; // list of tickets for sale\n mapping(address => uint256[]) private _purchasedTickets; // tracking specific address to tickets\n mapping(uint256 => TicketDetails) private _ticketDetails; // mapping structure of ticket to each ticket\n\n FestivalToken private _token;\n\n constructor(\n string memory name_,\n string memory symbol_,\n string memory baseTokenURI_,\n address payable wallet_,\n FestivalToken token_\n ) ERC721(name_, symbol_) {\n _baseTokenURI = baseTokenURI_;\n _organiser = wallet_;\n _token = token_;\n }\n\n //////////////////////////////////////////////////////////////////\n // CORE FUNCTIONS //\n //////////////////////////////////////////////////////////////////\n\n function setBaseURI(string memory baseTokenURI_) public onlyOwner whenURINotFrozen {\n _baseTokenURI = baseTokenURI_;\n }\n\n function _baseURI() internal view override returns (string memory) {\n return _baseTokenURI;\n }\n\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n string memory tokenUri = super.tokenURI(tokenId);\n return bytes(tokenUri).length > 0 ? string(abi.encodePacked(tokenUri, \".json\")) : \"\";\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal override(ERC721, ERC721Enumerable, ERC721Pausable, ERC721MintPausable) {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal override(ERC721, ERC721Freezable) {\n super._afterTokenTransfer(from, to, tokenId);\n }\n\n //////////////////////////////////////////////////////////////////\n // PUBLIC SALE //\n //////////////////////////////////////////////////////////////////\n\n function startPublicSale() public onlyOwner {\n _publicSaleOpen = true;\n }\n\n function publicMint(uint256 count) public payable nonReentrant {\n require(_publicSaleOpen, \"Public sale not active\");\n require(_tokenId + count <= MAX_SUPPLY, \"Exceeds max supply\");\n require(count < MAX_PER_TX, \"Exceeds max per transaction\");\n _token.transferFrom(_msgSender(), _organiser, count * PRICE); // Error will throw if insufficient funds\n\n for (uint256 i; i < count; i++) {\n _mint(_msgSender(), ++_tokenId);\n _purchasedTickets[_msgSender()].push(_tokenId); // mapping token id to buyer\n _ticketDetails[_tokenId] = TicketDetails({ // initialise structure to ticket\n ticketOwner: _msgSender(),\n currentPrice: PRICE,\n sellingPrice: 0,\n forSale: false\n });\n }\n }\n\n //////////////////////////////////////////////////////////////////\n // POST SALE MANAGEMENT //\n //////////////////////////////////////////////////////////////////\n\n function withdraw() public {\n _organiser.transfer(address(this).balance);\n }\n\n function wallet() public view returns (address) {\n return _organiser;\n }\n\n function _burn(uint256 tokenId) internal override(ERC721) {\n super._burn(tokenId);\n }\n\n function burn(uint256 tokenId) public override {\n _burn(tokenId);\n }\n\n function freeze() public onlyOwner {\n super._freeze();\n }\n\n //////////////////////////////////////////////////////////////////\n // Pausable & MintPausable //\n //////////////////////////////////////////////////////////////////\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function pauseMint() public onlyOwner {\n _pauseMint();\n }\n\n function unpauseMint() public onlyOwner {\n _unpauseMint();\n }\n\n //////////////////////////////////////////////////////////////////\n // ERC165 //\n //////////////////////////////////////////////////////////////////\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {\n return\n interfaceId == type(Ownable).interfaceId ||\n interfaceId == type(ERC721Burnable).interfaceId ||\n interfaceId == type(ERC721Enumerable).interfaceId ||\n interfaceId == type(ERC721Freezable).interfaceId ||\n interfaceId == type(ERC721MintPausable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n //////////////////////////////////////////////////////////////////\n // Festival Functions //\n //////////////////////////////////////////////////////////////////\n\n //////////////////////////////////////////////////////////////////\n // Modifier Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n Modifier - Validate that the selling price does not exceed 110% more than the \n current price.\n */\n\n modifier checkSellingPrice(uint256 ticketId, uint256 sellingPrice) {\n uint256 currentPrice = _ticketDetails[ticketId].currentPrice;\n require(\n currentPrice + SafeMath.div(SafeMath.mul(currentPrice, 110), 100) > sellingPrice,\n \"Re-selling price is more than 110%\"\n );\n _;\n }\n\n /*\n Modifier - Check msg sender is ticket owner\n */\n\n modifier checkTicketIsOwner(uint256 ticketId, address ticketOwner) {\n address realOwner = _ticketDetails[ticketId].ticketOwner;\n require(realOwner == ticketOwner, \"You are not the ticket owner.\");\n _;\n }\n\n /*\n Modifier - Check msg sender is not ticket owner\n */\n\n modifier checkTicketIsNotOwner(uint256 ticketId, address ticketOwner) {\n address realOwner = _ticketDetails[ticketId].ticketOwner;\n require(realOwner != ticketOwner, \"You are the ticket owner.\");\n _;\n }\n\n /*\n Modifier - Check if ticket is on sale\n */\n\n modifier checkTicketOnSale(uint256 ticketId) {\n require(_ticketDetails[ticketId].forSale, \"Ticket is not on sale.\");\n _;\n }\n\n /*\n Modifier - Check if ticket is not on sale\n */\n\n modifier checkTicketNotOnSale(uint256 ticketId) {\n require(!_ticketDetails[ticketId].forSale, \"Ticket is on sale.\");\n _;\n }\n\n /*\n Modifier - Check if value is sufficient for ticket purchase\n */\n\n modifier checkSufficientValue(uint256 ticketId, uint256 value) {\n uint256 sellingPrice = _ticketDetails[ticketId].sellingPrice;\n require(value >= sellingPrice, \"Insufficient token for purchase.\");\n _;\n }\n\n //////////////////////////////////////////////////////////////////\n // Secondary Marketplace Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n List ticket on secondary market.\n - Checks selling price validity\n - Checks ticket owner is msg sender\n - Checks ticket is not on sale\n */\n\n function setListing(uint256 ticketId, uint256 sellingPrice_)\n public\n checkSellingPrice(ticketId, sellingPrice_)\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketNotOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\n _ticketDetails[ticketId].forSale = true;\n ticketsOnSale.push(ticketId);\n }\n\n /*\n Remove ticket listing on secondary market.\n - Checks ticket owner is msg sender\n - Checks if ticket is on sale\n */\n\n function removeListing(uint256 ticketId)\n public\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = 0;\n _ticketDetails[ticketId].forSale = false;\n removeTicketOnSale(ticketId);\n }\n\n /*\n Adjust ticket listing on secondary market.\n - Checks selling price validity\n - Checks ticket owner is msg sender\n - Checks if ticket is on sale\n */\n\n function adjustListing(uint256 ticketId, uint256 sellingPrice_)\n public\n checkSellingPrice(ticketId, sellingPrice_)\n checkTicketIsOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n _ticketDetails[ticketId].sellingPrice = sellingPrice_;\n }\n\n /*\n Buy ticket listing on secondary market.\n - Check sufficient buying power\n - Check ticket owner is not msg sender\n - Checks if ticket is on sale\n */\n\n function purchaseListing(uint256 ticketId, uint256 value)\n public\n payable\n checkSufficientValue(ticketId, value)\n checkTicketIsNotOwner(ticketId, _msgSender())\n checkTicketOnSale(ticketId)\n {\n address payable seller = payable(_ticketDetails[ticketId].ticketOwner);\n address payable buyer = payable(_msgSender());\n uint256 sellingPrice = _ticketDetails[ticketId].sellingPrice;\n uint256 commissionPrice = SafeMath.div(SafeMath.mul(sellingPrice, commission), 100);\n // Transferring of Tokens\n _token.transferFrom(buyer, seller, sellingPrice - commissionPrice);\n if (commissionPrice > 0) {\n _token.transferFrom(buyer, _organiser, commissionPrice);\n }\n // Transferring of NFT\n transferFrom(seller, buyer, ticketId);\n // Adjusting lists\n removeTicketOnSale(ticketId);\n removeTicketFromPurchased(seller, ticketId);\n _purchasedTickets[buyer].push(_tokenId);\n }\n\n //////////////////////////////////////////////////////////////////\n // Owner Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n Monetisation option\n Input in whole numbers - E.g. 10% = 10, 100% = 100\n Limitation range : 0 - 100\n */\n function monetise(uint256 commissionPercentage) public onlyOwner {\n commission = commissionPercentage;\n }\n\n //////////////////////////////////////////////////////////////////\n // Internal Functions //\n //////////////////////////////////////////////////////////////////\n\n /*\n Internal - Remove ticket from ticket on sale list\n */\n\n function removeTicketOnSale(uint256 ticketId) internal {\n uint256 numOfTickets = ticketsOnSale.length;\n\n for (uint256 i = 0; i < numOfTickets; i++) {\n if (ticketsOnSale[i] == ticketId) {\n for (uint256 j = i + 1; j < numOfTickets; j++) {\n ticketsOnSale[j - 1] = ticketsOnSale[j];\n }\n ticketsOnSale.pop();\n }\n }\n }\n\n /*\n Internal - Remove ticket from purchased list\n */\n\n function removeTicketFromPurchased(address person, uint256 ticketId) internal {\n uint256 numOfTickets = _purchasedTickets[person].length;\n\n for (uint256 i = 0; i < numOfTickets; i++) {\n if (_purchasedTickets[person][i] == ticketId) {\n for (uint256 j = i + 1; j < numOfTickets; j++) {\n _purchasedTickets[person][j - 1] = _purchasedTickets[person][j];\n }\n _purchasedTickets[person].pop();\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////\n // Getter Functions //\n //////////////////////////////////////////////////////////////////\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing 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/token/ERC721/extensions/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC721 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC721Pausable is ERC721, Pausable {\n /**\n * @dev See {ERC721-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n require(!paused(), \"ERC721Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 nor approved\");\n _burn(tokenId);\n }\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721Freezable.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\n\nabstract contract ERC721Freezable is ERC721Enumerable {\n event PermanentURI(string _value, uint256 indexed _id);\n\n bool private _isUriFrozen;\n\n modifier whenURINotFrozen() {\n require(!frozen(), \"ERC721Freezable: URI is frozen\");\n _;\n }\n\n modifier whenURIFrozen() {\n require(frozen(), \"ERC721Freezable: URI is not frozen\");\n _;\n }\n\n constructor() {\n _isUriFrozen = false;\n }\n\n function frozen() public view returns (bool) {\n return _isUriFrozen;\n }\n\n function _freeze() internal virtual whenURINotFrozen {\n _isUriFrozen = true;\n }\n\n function freezeToken(uint256 tokenId) public whenURIFrozen {\n emit PermanentURI(tokenURI(tokenId), tokenId);\n }\n\n function freezeAllTokens() public whenURIFrozen {\n uint256 totalSupply = totalSupply();\n for (uint256 tokenId = 1; tokenId <= totalSupply; tokenId++) {\n emit PermanentURI(tokenURI(tokenId), tokenId);\n }\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._afterTokenTransfer(from, to, tokenId);\n if (frozen()) {\n freezeToken(tokenId);\n }\n }\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721MintPausable.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\nabstract contract ERC721MintPausable is ERC721 {\n bool private _mintingPaused;\n\n event MintPaused(address account);\n event MintUnpaused(address account);\n\n modifier whenMintNotPaused() {\n require(!mintPaused(), \"ERC721MintPausable: Mint paused\");\n _;\n }\n\n modifier whenMintPaused() {\n require(mintPaused(), \"ERC721MintPausable: Mint not paused\");\n _;\n }\n\n constructor() {\n _mintingPaused = false;\n }\n\n function mintPaused() public view returns (bool) {\n return _mintingPaused;\n }\n\n function _pauseMint() internal virtual whenMintNotPaused {\n _mintingPaused = true;\n }\n\n function _unpauseMint() internal virtual whenMintPaused {\n _mintingPaused = false;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n require((!mintPaused() || from != address(0)), \"ERC721MintPausable: Minting is disabled\");\n }\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721Batch.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\nabstract contract ERC721Batch is ERC721 {\n function batchTransferFrom(\n address _from,\n address _to,\n uint256[] memory _tokenIds\n ) public {\n for (uint256 i = 0; i < _tokenIds.length; i++) {\n transferFrom(_from, _to, _tokenIds[i]);\n }\n }\n\n function batchSafeTransferFrom(\n address _from,\n address _to,\n uint256[] memory _tokenIds,\n bytes memory data_\n ) public {\n for (uint256 i = 0; i < _tokenIds.length; i++) {\n safeTransferFrom(_from, _to, _tokenIds[i], data_);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) 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(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) 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(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n" + }, + "contracts/FestivalToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/security/Pausable.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * @title GenericToken\n * @notice This contract is a generic token adhering to the ERC20 standard,\n * using the OpenZeppelin template libary for battletested functionality.\n *\n * It incorporates the standard ERC20 functions, enhanced with Minting\n * and Burning, Pausable in case of emergencies and AccessControl for locking\n * down the administrative functions.\n *\n * For demonstrative purposes, 1 million GT tokens are pre-mined to the address\n * deploying this contract.\n */\ncontract FestivalToken is ERC165, ERC20, ERC20Burnable, Pausable, AccessControl {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _mint(msg.sender, 1000000 * 10**decimals());\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n interfaceId == type(ERC20Burnable).interfaceId ||\n interfaceId == type(Pausable).interfaceId ||\n super.supportsInterface(interfaceId); // ERC165, AccessControl\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\n */\n function pause() public onlyRole(DEFAULT_ADMIN_ROLE) {\n _pause();\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n * - The sender of the transaction must have the DEFAULT_ADMIN_ROLE\n */\n function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) {\n _unpause();\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing 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 * - `msg.sender` needs the DEFAULT_ADMIN_ROLE.\n *\n * @param to The address to mint the new tokens into\n * @param amount The amount of tokens to mint, denominated by the decimals() function\n */\n function mint(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {\n _mint(to, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the 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 * @param amount The amount of tokens to burn from the sender of the transaction, denominated by the decimals() function\n */\n function burn(uint256 amount) public virtual override {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens 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 function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override whenNotPaused {\n super._beforeTokenTransfer(from, to, amount);\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/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 = _owners[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 nor 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(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor 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(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) 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 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 _owners[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(\n address to,\n uint256 tokenId,\n bytes memory data\n ) 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);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\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);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId);\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(\n address from,\n address to,\n uint256 tokenId\n ) 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);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId);\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(\n address owner,\n address operator,\n bool approved\n ) 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\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` 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(\n address from,\n address to,\n uint256 tokenId\n ) 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.\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(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) 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(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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(\n address from,\n address to,\n uint256 tokenId\n ) 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/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/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 *\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_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" + }, + "@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/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/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\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 * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\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 value {ERC20} uses, unless this function is\n * 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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 }\n _balances[to] += amount;\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 _balances[account] += amount;\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 }\n _totalSupply -= amount;\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(\n address owner,\n address spender,\n uint256 amount\n ) 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(\n address owner,\n address spender,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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(\n address from,\n address to,\n uint256 amount\n ) 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/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\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/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "contracts/library/token/ERC20/crowdsale/CrowdSale.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport {Context} from \"@openzeppelin/contracts/utils/Context.sol\";\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {AggregatorV3Interface} from \"../../../integration/chainlink/AggregatorV3Interface.sol\";\nimport {VestingVault} from \"../../../finance/vesting/VestingVault.sol\";\nimport {ICrowdSale} from \"./ICrowdSale.sol\";\n\n/**\n * @title CrowdSale\n */\ncontract CrowdSale is Context, ERC165, Pausable, AccessControl, ReentrancyGuard, ICrowdSale {\n bytes32 public constant WHITELISTED_ROLE = keccak256(\"WHITELISTED_ROLE\");\n\n // The token being sold\n IERC20 private _token;\n\n // The price feed for conversion rates from Matic to USD\n // Learn more: https://docs.chain.link/docs/matic-addresses/\n AggregatorV3Interface internal priceFeed;\n\n // Number of tokens for one USD\n uint256 private _usdRate;\n\n // Address where funds are collected\n address payable private _wallet;\n\n // Amount of wei raised\n uint256 private _fundsRaised;\n\n // vesting end date\n uint256 private _vestingEndDate;\n\n // vesting vault\n VestingVault private _vestingVault;\n\n struct Vesting {\n uint256 amount;\n uint256 cliff;\n }\n\n // Mapping of addresses to Vestings\n mapping(address => Vesting) private _vested;\n\n constructor(\n address priceFeed_,\n address token_,\n address payable wallet_,\n uint256 usdRate_,\n uint256 vestingEndDate_,\n address vestingVault_\n ) {\n require(wallet_ != address(0), \"Crowdsale: wallet is the zero address\");\n require(token_ != address(0), \"Crowdsale: token is the zero address\");\n\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n priceFeed = AggregatorV3Interface(priceFeed_);\n _token = IERC20(token_);\n _wallet = wallet_;\n _usdRate = usdRate_;\n _vestingEndDate = vestingEndDate_;\n _vestingVault = VestingVault(vestingVault_);\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\n return\n interfaceId == type(ICrowdSale).interfaceId ||\n interfaceId == type(Pausable).interfaceId ||\n super.supportsInterface(interfaceId); // ERC165, AccessControl\n }\n\n /**\n * @dev executed on a call to the contract if none of the other functions match the given function signature,\n * or if no data was supplied at all and there is no receive Ether function\n * Note that other contracts will transfer funds with a base gas stipend\n * of 2300, which is not enough to call buyTokens. Consider calling\n * buyTokens directly when purchasing tokens from a contract.\n * Learn more: https://docs.soliditylang.org/en/latest/contracts.html#fallback-function\n */\n fallback() external payable {\n buyTokens(_msgSender());\n }\n\n /**\n * @dev is executed on a call to the contract with empty calldata\n * Note that other contracts will transfer funds with a base gas stipend\n * of 2300, which is not enough to call buyTokens. Consider calling\n * buyTokens directly when purchasing tokens from a contract.\n * Learn more: https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function\n */\n receive() external payable {\n buyTokens(_msgSender());\n }\n\n /**\n * @return the address of the token being sold.\n */\n function token() public view override returns (IERC20) {\n return _token;\n }\n\n /**\n * @return the address where funds are collected.\n */\n function wallet() public view override returns (address payable) {\n return _wallet;\n }\n\n /**\n * @return the amount of funds raised.\n */\n function fundsRaised() public view override returns (uint256) {\n return _fundsRaised;\n }\n\n /**\n * @return the amount tokens available to the crowdsale for selling.\n */\n function tokensAvailable() public view override returns (uint256) {\n return token().balanceOf(address(this));\n }\n\n /**\n * @dev utility function to allow the owner to handle private and bitcoin buyers\n * This function has a non-reentrancy guard, so it shouldn't be called by\n * another `nonReentrant` function.\n * @param tokenAmount Number of tokens to be purchased\n * @param beneficiary Recipient of the token purchase\n */\n function externalBuyTokens(address beneficiary, uint256 tokenAmount)\n public\n override\n nonReentrant\n whenNotPaused\n onlyRole(DEFAULT_ADMIN_ROLE)\n {\n uint256 weiAmount = getWeiAmount(tokenAmount);\n preValidatePurchase(beneficiary, weiAmount);\n _fundsRaised += weiAmount;\n processPurchase(beneficiary, tokenAmount);\n emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokenAmount);\n updatePurchasingState(beneficiary, weiAmount);\n postValidatePurchase(beneficiary, weiAmount);\n }\n\n /**\n * @dev low level token purchase\n * This function has a non-reentrancy guard, so it shouldn't be called by\n * another `nonReentrant` function.\n * @param beneficiary Recipient of the token purchase\n */\n function buyTokens(address beneficiary)\n public\n payable\n override\n nonReentrant\n whenNotPaused\n onlyRole(WHITELISTED_ROLE)\n {\n uint256 weiAmount = msg.value;\n preValidatePurchase(beneficiary, weiAmount);\n uint256 tokenAmount = getTokenAmount(weiAmount);\n _fundsRaised += weiAmount;\n processPurchase(beneficiary, tokenAmount);\n emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokenAmount);\n updatePurchasingState(beneficiary, weiAmount);\n forwardFunds();\n postValidatePurchase(beneficiary, weiAmount);\n }\n\n /**\n * @dev Validates beneficiary and weiAmount before executing purchase\n */\n function preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {\n require(beneficiary != address(0), \"Crowdsale: beneficiary is the zero address\");\n require(weiAmount != 0, \"Crowdsale: amount is 0\");\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n }\n\n /**\n * @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send\n * tokens.\n * @param beneficiary Address receiving the tokens\n * @param tokenAmount Number of tokens to be purchased\n */\n function processPurchase(address beneficiary, uint256 tokenAmount) internal {\n if (_vestingEndDate > 0) {\n _vestingVault.addBeneficiary(beneficiary, _vestingEndDate, tokenAmount);\n deliverTokens(address(_vestingVault), tokenAmount);\n } else {\n deliverTokens(beneficiary, tokenAmount);\n }\n }\n\n /**\n * @dev Transfer of tokens from crowdsale to beneficiary. Override this method to modify the way in which the crowdsale ultimately gets and sends its tokens.\n * @param beneficiary Address performing the token purchase\n * @param tokenAmount Number of tokens to be transferred\n */\n function deliverTokens(address beneficiary, uint256 tokenAmount) internal {\n _token.transfer(beneficiary, tokenAmount);\n }\n\n /**\n * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid conditions are not met.\n * @param beneficiary Address performing the token purchase\n * @param weiAmount Value in wei involved in the purchase\n */\n function postValidatePurchase(address beneficiary, uint256 weiAmount) internal view {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Override for extensions that require an internal state to check for validity (current user contributions,\n * etc.)\n * @param beneficiary Address receiving the tokens\n * @param weiAmount Value in wei involved in the purchase\n */\n function updatePurchasingState(address beneficiary, uint256 weiAmount) internal {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Converts the weiAmount into equivalent number of tokens\n * @param weiAmount Value of wei for conversion\n */\n function getTokenAmount(uint256 weiAmount) internal view returns (uint256) {\n if (address(priceFeed) != address(0)) {\n (, int256 price, , , ) = priceFeed.latestRoundData();\n return ((weiAmount * uint256(price)) * _usdRate) / 10**8;\n }\n return ((weiAmount * 10) * _usdRate); // fixed rate of 10 USD per ETH\n }\n\n /**\n * @dev Converts the tokenAmount into equivalent number of wei\n * @param tokenAmount Number of tokens for convertion\n */\n function getWeiAmount(uint256 tokenAmount) internal view returns (uint256) {\n if (address(priceFeed) != address(0)) {\n (, int256 price, , , ) = priceFeed.latestRoundData();\n return (tokenAmount * 10**8) / (uint256(price) * _usdRate);\n }\n return (((tokenAmount) / 10) * _usdRate); // fixed rate of 10 USD per ETH\n }\n\n /**\n * @dev Determines how ETH is stored/forwarded on purchases.\n */\n function forwardFunds() internal {\n _wallet.transfer(msg.value);\n }\n}\n" + }, + "contracts/library/integration/chainlink/AggregatorV3Interface.sol": { + "content": "// SPDX-License-Identifier: MIT\n// source: https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\npragma solidity ^0.8.9;\n\ninterface AggregatorV3Interface {\n function decimals() external view returns (uint8);\n\n function description() external view returns (string memory);\n\n function version() external view returns (uint256);\n\n // getRoundData and latestRoundData should both raise \"No data present\"\n // if they do not have data to report, instead of returning unset values\n // which could be misinterpreted as actual reported values.\n function getRoundData(uint80 _roundId)\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n}\n" + }, + "contracts/library/finance/vesting/VestingVault.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport {IVestingVault} from \"./IVestingVault.sol\";\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title VestingVault\n */\ncontract VestingVault is IVestingVault, ERC165, AccessControl {\n bytes32 public constant VAULT_CONTROLLER_ROLE = keccak256(\"VAULT_CONTROLLER_ROLE\");\n IERC20 private immutable _token;\n mapping(address => Vesting[]) private _vesting;\n\n constructor(IERC20 token_) {\n _token = token_;\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setRoleAdmin(VAULT_CONTROLLER_ROLE, DEFAULT_ADMIN_ROLE);\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\n return interfaceId == type(IVestingVault).interfaceId || super.supportsInterface(interfaceId); // ERC165\n }\n\n /**\n * @dev function to create a vesting for the beneficiary\n * @param beneficiary_ Beneficiary of tokens after they are released\n * @param releaseTime_ Timestamp when token release is enabled\n * @param tokenAmount_ Amount of tokens to release\n */\n function addBeneficiary(\n address beneficiary_,\n uint256 releaseTime_,\n uint256 tokenAmount_\n ) public override onlyRole(VAULT_CONTROLLER_ROLE) {\n Vesting[] memory vestings = _vesting[beneficiary_];\n\n for (uint256 i = 0; i < vestings.length; i++) {\n if (releaseTime_ == vestings[i].releaseTime) {\n _vesting[beneficiary_][i].tokenAmount += tokenAmount_;\n emit VestingLockedIn(beneficiary_, releaseTime_, tokenAmount_);\n return;\n }\n }\n\n _vesting[beneficiary_].push(Vesting(beneficiary_, releaseTime_, tokenAmount_));\n emit VestingLockedIn(beneficiary_, releaseTime_, tokenAmount_);\n return;\n }\n\n /**\n * @return the address of the token being stored.\n */\n function token() public view override returns (IERC20) {\n return _token;\n }\n\n /**\n * @return the vesting for an address\n * @param beneficiary_ the address for which the vesting is returned\n */\n function vestingFor(address beneficiary_) public view override returns (Vesting[] memory) {\n return _vesting[beneficiary_];\n }\n\n /**\n * @dev releases the tokens of the msg sender\n */\n function release() public override {\n Vesting[] memory vestings = _vesting[_msgSender()];\n uint256 tokensToRelease = 0;\n for (uint256 i = 0; i < vestings.length; i++) {\n if (vestings[i].releaseTime <= block.timestamp) {\n tokensToRelease = tokensToRelease + vestings[i].tokenAmount;\n emit VestingReleased(_msgSender(), vestings[i].releaseTime, vestings[i].tokenAmount);\n _vesting[_msgSender()][i].tokenAmount = 0;\n }\n }\n\n require(tokensToRelease > 0, \"VestingVault: Cannot release 0 tokens\");\n\n token().transfer(_msgSender(), tokensToRelease);\n }\n}\n" + }, + "contracts/library/token/ERC20/crowdsale/ICrowdSale.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title ICrowdSale\n */\ninterface ICrowdSale {\n event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);\n\n function token() external view returns (IERC20);\n\n function wallet() external view returns (address payable);\n\n function fundsRaised() external view returns (uint256);\n\n function tokensAvailable() external view returns (uint256);\n\n function buyTokens(address beneficiary) external payable;\n\n function externalBuyTokens(address beneficiary, uint256 tokenAmount) external;\n}\n" + }, + "contracts/library/finance/vesting/IVestingVault.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IVestingVault {\n struct Vesting {\n // Beneficiary of tokens after they are released\n address beneficiary;\n // Timestamp when token release is enabled\n uint256 releaseTime;\n // Amount of tokens to release\n uint256 tokenAmount;\n }\n\n event VestingLockedIn(address indexed beneficiary, uint256 releaseTime, uint256 tokenAmount);\n event VestingReleased(address indexed beneficiary, uint256 releaseTime, uint256 tokenAmount);\n\n function addBeneficiary(\n address beneficiary_,\n uint256 releaseTime_,\n uint256 tokenAmount_\n ) external;\n\n function token() external view returns (IERC20);\n\n function vestingFor(address beneficary_) external view returns (Vesting[] memory);\n\n function release() external;\n}\n" + }, + "contracts/library/statemachine/StateMachine.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * @title Base contract for state machines\n */\nabstract contract StateMachine is ERC165, AccessControl {\n event Transition(address sender, bytes32 fromState, bytes32 toState);\n\n struct State {\n // a boolean to check if the state is actually created\n bool hasBeenCreated;\n // a mapping of functions that can be executed when in this state\n mapping(bytes4 => bool) allowedFunctions;\n // a mapping of alls roles that have been configured for this state\n mapping(bytes32 => bool) allAllowedRoles;\n // a list of all the roles that have been configured for this state\n bytes32[] allowedRoles;\n // a list of all the preconditions that have been configured for this state\n function(bytes32, bytes32) internal view[] preConditions;\n // a list of callbacks to execute before the state transition completes\n function(bytes32, bytes32) internal[] callbacks;\n // a list of states that can be transitioned to\n bytes32[] nextStates;\n // function that executes logic and then does a StateTransition\n bytes4 preFunction;\n }\n\n struct StateTransition {\n bytes32 fromState;\n bytes32 toState;\n address actor;\n uint256 timestamp;\n }\n\n StateTransition[] public history;\n\n mapping(bytes32 => State) internal states;\n bytes32[] internal possibleStates;\n bytes32 internal currentState;\n\n // a list of selectors that might be allowed functions\n bytes4[] internal knownSelectors;\n mapping(bytes4 => bool) internal knownSelector;\n\n // a mapping of allowed functions per state\n mapping(bytes32 => bytes4[]) internal stateFunction;\n\n // To Check if there is a relation between one state and another\n mapping(bytes32 => mapping(bytes32 => bool)) internal nextStateToState;\n\n // Id of the entity that is traversing the different states\n // uint256 format because sha3 or UUID are 64 bytes\n uint256 internal _entityId;\n\n // baseURI fixed prefix of a entityURI\n string internal _baseURI = \"\";\n\n /**\n * @notice Modifier to ensure only Admin can call specific functions\n */\n modifier hasAdminRole(address caller) {\n require(hasRole(DEFAULT_ADMIN_ROLE, caller), \"Caller is not an admin\");\n _;\n }\n\n /**\n * @dev Returns whether `entityId` exists.\n **/\n function _exists(uint256 entityId) internal view virtual returns (bool) {\n return _entityId != 0 && entityId == _entityId;\n }\n\n /**\n * @notice Modifier to ensure the statemachine was setup\n */\n modifier checkStateMachineSetup() {\n require(possibleStates.length > 0, \"this statemachine has not been setup yet\");\n _;\n }\n\n /**\n * @notice Modifier to secure functions for a specific state\n */\n modifier checkAllowedFunction() {\n require(states[currentState].allowedFunctions[msg.sig], \"this function is not allowed in this state\");\n _;\n }\n\n /**\n * @notice Modifier that checks if we can trigger a transition between the current state and the next state\n */\n modifier checkTransitionCriteria(bytes32 toState, bytes32 role) {\n checkAllTransitionCriteria(getCurrentState(), toState, role);\n _;\n }\n\n /**\n * @notice Modifier that checks if a state already exists or not\n */\n modifier doesStateExist(bytes32 state) {\n require(states[state].hasBeenCreated, \"the state has not been created yet\");\n _;\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, AccessControl) returns (bool) {\n return interfaceId == type(StateMachine).interfaceId || super.supportsInterface(interfaceId); // ERC165, AccessControl\n }\n\n /**\n * @notice Returns the length of the history\n */\n function getHistoryLength() public view returns (uint256) {\n return history.length;\n }\n\n /**\n * @notice Returns history as tuple for given index.\n * @dev Requires the index to be within the bounds of the history array\n */\n function getHistory(uint256 index)\n public\n view\n returns (\n bytes32 fromState,\n bytes32 toState,\n address actor,\n uint256 timestamp\n )\n {\n require(index >= 0 && index < history.length, \"Index out of bounds\");\n return (history[index].fromState, history[index].toState, history[index].actor, history[index].timestamp);\n }\n\n /**\n * @notice Returns the name of the current state of this object.\n * @dev Requires the current state to be configured before calling this function\n */\n function getCurrentState() public view returns (bytes32 state) {\n require(states[currentState].hasBeenCreated, \"the initial state has not been created yet\");\n return currentState;\n }\n\n /**\n * @notice Returns a list of all the possible states of this object.\n */\n function getAllStates() public view returns (bytes32[] memory allStates) {\n return possibleStates;\n }\n\n /**\n * @notice Returns a list of all the possible next states of the current state.\n */\n function getNextStates() public view returns (bytes32[] memory nextStates) {\n return states[currentState].nextStates;\n }\n\n /**\n * @notice Returns state as tuple for give state.\n */\n function getState(bytes32 state)\n public\n view\n returns (\n bytes32 name,\n bytes32[] memory nextStates,\n bytes32[] memory allowedRoles,\n bytes4[] memory allowedFunctions,\n bytes4 preFunction\n )\n {\n State storage s = states[state];\n\n return (state, s.nextStates, s.allowedRoles, stateFunction[state], s.preFunction);\n }\n\n /**\n * @notice Transitions the state and executes all callbacks.\n * @dev Emits a Transition event after a successful transition.\n */\n function transitionState(bytes32 toState, bytes32 role)\n public\n checkStateMachineSetup\n checkTransitionCriteria(toState, role)\n {\n bytes32 oldState = currentState;\n currentState = toState;\n\n function(bytes32, bytes32) internal[] storage callbacks = states[oldState].callbacks;\n for (uint256 i = 0; i < callbacks.length; i++) {\n callbacks[i](oldState, toState);\n }\n\n history.push(\n StateTransition({fromState: oldState, toState: toState, actor: msg.sender, timestamp: block.timestamp})\n );\n\n emit Transition(msg.sender, oldState, currentState);\n }\n\n /**\n * @dev Abstract function to setup the state machine configuration\n */\n function setupStateMachine(address admin) internal virtual {}\n\n function createState(bytes32 stateName) internal {\n require(!states[stateName].hasBeenCreated, \"this state has already been created\");\n states[stateName].hasBeenCreated = true;\n possibleStates.push(stateName);\n }\n\n /**\n * @notice Updates expense properties\n * @param roleName Bytes32 name of the role to be granted\n * @param account Grant a role to a specific account\n */\n function grantRoleToAccount(bytes32 roleName, address account) public hasAdminRole(msg.sender) {\n _grantRole(roleName, account);\n }\n\n /**\n * @notice Add a role at a specific state on a specific account\n * @param state Bytes32 state name\n * @param role Role related to that state\n * @param account Account to add the role for\n */\n function addRoleForState(\n bytes32 state,\n bytes32 role,\n address account\n ) public doesStateExist(state) hasAdminRole(msg.sender) {\n require(!states[state].allAllowedRoles[role], \"the role has been already added at this state\");\n states[state].allAllowedRoles[role] = true;\n states[state].allowedRoles.push(role);\n _grantRole(role, account);\n }\n\n /**\n * @notice Define specific functions for a state\n * @param state Bytes32 state name\n * @param allowedFunction Set of functions for that state\n */\n function addAllowedFunctionForState(bytes32 state, bytes4 allowedFunction)\n public\n doesStateExist(state)\n hasAdminRole(msg.sender)\n {\n if (!knownSelector[allowedFunction]) {\n knownSelector[allowedFunction] = true;\n knownSelectors.push(allowedFunction);\n }\n states[state].allowedFunctions[allowedFunction] = true;\n stateFunction[state].push(allowedFunction);\n }\n\n /**\n * @notice Define next state for state\n * @param state Bytes32 state name\n * @param nextState Next state to transit to\n */\n function addNextStateForState(bytes32 state, bytes32 nextState)\n public\n doesStateExist(state)\n doesStateExist(nextState)\n hasAdminRole(msg.sender)\n {\n states[state].nextStates.push(nextState);\n nextStateToState[state][nextState] = true;\n }\n\n function addCallbackForState(bytes32 state, function(bytes32, bytes32) internal callback)\n internal\n doesStateExist(state)\n {\n states[state].callbacks.push(callback);\n }\n\n function addPreConditionForState(bytes32 state, function(bytes32, bytes32) internal view preCondition)\n internal\n doesStateExist(state)\n {\n states[state].preConditions.push(preCondition);\n }\n\n function setPreFunctionForState(bytes32 state, bytes4 functionSig) internal doesStateExist(state) {\n states[state].preFunction = functionSig;\n }\n\n /**\n * @notice Configures the initial state of an object\n */\n function setInitialState(bytes32 initialState) internal {\n require(states[initialState].hasBeenCreated, \"the initial state has not been created yet\");\n require(currentState == 0, \"Current state has already been set, you cannot reset it\");\n currentState = initialState;\n emit Transition(msg.sender, 0x00, currentState);\n }\n\n /**\n * @notice Function that checks if we can trigger a transition between two states\n * @dev This checks if the states exist, if the user has a role to go to the chosen next state and\n * @dev and if all the preconditions give the ok.\n */\n function checkAllTransitionCriteria(\n bytes32 fromState,\n bytes32 toState,\n bytes32 role\n ) private view {\n require(states[fromState].hasBeenCreated, \"the from state has not been configured in this object\");\n require(states[toState].hasBeenCreated, \"the to state has not been configured in this object\");\n require(checkNextStates(fromState, toState), \"This transition is not allowed\");\n require(checkAllowedRoles(role), \"the sender of this transaction cannot perform this transition\");\n checkPreConditions(fromState, toState);\n }\n\n /**\n * @notice Checks if it is allowed to transition between the given states\n */\n function checkNextStates(bytes32 fromState, bytes32 toState) private view returns (bool hasNextState) {\n hasNextState = false;\n if (nextStateToState[fromState][toState]) {\n hasNextState = true;\n }\n return hasNextState;\n }\n\n /**\n * @notice Checks all the custom preconditions that determine if it is allowed to transition to a next state\n * @dev Make sure the preconditions require or assert their checks and have an understandable error message\n */\n function checkPreConditions(bytes32 fromState, bytes32 toState) private view {\n function(bytes32, bytes32) internal view[] storage preConditions = states[toState].preConditions;\n for (uint256 i = 0; i < preConditions.length; i++) {\n preConditions[i](fromState, toState);\n }\n }\n\n /**\n * @notice Checks if the sender has a role that is allowed to transition to a next state\n */\n function checkAllowedRoles(bytes32 role) public view returns (bool) {\n return hasRole(role, msg.sender);\n }\n}\n" + }, + "contracts/library/statemachine/extensions/StateMachineMetadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\nimport \"../StateMachine.sol\";\n\nabstract contract StateMachineMetadata is StateMachine {\n // mapping for entityURIs\n mapping(uint256 => string) private _entityURIs;\n\n /**\n * @dev get the attwched entityURI from an existing entityId\n */\n function entityURI(uint256 entityId) public view virtual returns (string memory) {\n require(_exists(entityId), \"StateMachineMetadata: URI query for nonexistent entity\");\n string memory _entityURI = _entityURIs[entityId];\n\n // If the baseURI is empty, just return the unprefixed URI\n if (bytes(_baseURI).length == 0) {\n return _entityURI;\n }\n\n return string(abi.encodePacked(_baseURI, _entityURI));\n }\n\n /**\n * @dev Sets `_entityURI` as the entityURI of `entityId`.\n *\n * Requirements:\n *\n * - `entityId` must exist.\n */\n function _setEntityURI(uint256 entityId, string memory _entityURI) internal virtual {\n require(_exists(entityId), \"StateMachineMetaData: URI set of nonexistent \");\n _entityURIs[entityId] = _entityURI;\n }\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721Whitelist.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MerkleProof.sol\";\n\nabstract contract ERC721Whitelist is Context {\n bytes32 public _whitelistMerkleRoot;\n\n function _setWhitelistMerkleRoot(bytes32 whitelistMerkleRoot_) internal {\n _whitelistMerkleRoot = whitelistMerkleRoot_;\n }\n\n function _leaf(string memory allowance, string memory payload) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(payload, allowance));\n }\n\n function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) {\n require(_whitelistMerkleRoot != 0, \"Whitelist merkle root not set\");\n return MerkleProof.verify(proof, _whitelistMerkleRoot, leaf);\n }\n\n function getAllowance(string memory allowance, bytes32[] calldata proof) public view returns (string memory) {\n string memory payload = string(abi.encodePacked(_msgSender()));\n require(_verify(_leaf(allowance, payload), proof), \"Invalid Merkle Tree proof supplied.\");\n return allowance;\n }\n\n function _validateWhitelistMerkleProof(uint256 allowance, bytes32[] calldata proof) internal view returns (bool) {\n string memory payload = string(abi.encodePacked(_msgSender()));\n return _verify(_leaf(Strings.toString(allowance), payload), proof);\n }\n\n function _disableWhitelistMerkleRoot() internal {\n delete _whitelistMerkleRoot;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Tree proofs.\n *\n * The proofs can be generated using the JavaScript library\n * https://github.com/miguelmota/merkletreejs[merkletreejs].\n * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.\n *\n * See `test/utils/cryptography/MerkleProof.test.js` for some examples.\n *\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\n * hashing, or use a hash function other than keccak256 for hashing leaves.\n * This is because the concatenation of a sorted pair of internal nodes in\n * the merkle tree could be reinterpreted as a leaf value.\n */\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Calldata version of {verify}\n *\n * _Available since v4.7._\n */\n function verifyCalldata(\n bytes32[] calldata proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProofCalldata(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Calldata version of {processProof}\n *\n * _Available since v4.7._\n */\n function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by\n * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.\n *\n * _Available since v4.7._\n */\n function multiProofVerify(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProof(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Calldata version of {multiProofVerify}\n *\n * _Available since v4.7._\n */\n function multiProofVerifyCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProofCalldata(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,\n * consuming from one or the other at each step according to the instructions given by\n * `proofFlags`.\n *\n * _Available since v4.7._\n */\n function processMultiProof(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, \"MerkleProof: invalid multiproof\");\n\n // The xxxPos values are \"pointers\" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \"pop\".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the \"main queue\". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the \"main queue\" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n /**\n * @dev Calldata version of {processMultiProof}\n *\n * _Available since v4.7._\n */\n function processMultiProofCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, \"MerkleProof: invalid multiproof\");\n\n // The xxxPos values are \"pointers\" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \"pop\".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the \"main queue\". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the \"main queue\" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {\n return a < b ? _efficientHash(a, b) : _efficientHash(b, a);\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/library/token/ERC721/extensions/ERC721OpenSeaGassLess.sol": { + "content": "/**\n * Copyright (C) SettleMint NV - All Rights Reserved\n *\n * Use of this file is strictly prohibited without an active subscription.\n * Distribution of this file, via any medium, is strictly prohibited.\n *\n * For license inquiries, contact hello@settlemint.com\n *\n * SPDX-License-Identifier: UNLICENSED\n */\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\nabstract contract ERC721OpenSeaGassLess is ERC721 {\n address public _proxyRegistryAddress;\n\n constructor(address proxyRegistryAddress_) {\n _proxyRegistryAddress = proxyRegistryAddress_;\n }\n\n function _setProxyRegistryAddress(address proxyRegistryAddress_) internal virtual {\n _proxyRegistryAddress = proxyRegistryAddress_;\n }\n\n function isApprovedForAll(address _owner, address operator) public view virtual override returns (bool) {\n if (_proxyRegistryAddress != address(0)) {\n OpenSeaProxyRegistry proxyRegistry = OpenSeaProxyRegistry(_proxyRegistryAddress);\n if (address(proxyRegistry.proxies(_owner)) == operator) {\n return true;\n }\n }\n return super.isApprovedForAll(_owner, operator);\n }\n}\n\ncontract OwnableDelegateProxy {}\n\ncontract OpenSeaProxyRegistry {\n mapping(address => OwnableDelegateProxy) public proxies;\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.3) (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\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 } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' 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(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) 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(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) 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(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) 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 if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\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(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) 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) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\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) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.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 {\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 bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n address private immutable _CACHED_THIS;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\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(string memory name, string memory version) {\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 _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _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" + }, + "contracts/library/metatx/Forwarder.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}.\n */\ncontract Forwarder is EIP712, ERC165 {\n using ECDSA for bytes32;\n\n struct ForwardRequest {\n address from;\n address to;\n uint256 value;\n uint256 gas;\n uint256 nonce;\n bytes data;\n }\n\n event ForwarderCreated(address indexed forwarderAddress);\n event MetaTransactionExecuted(address indexed from, address indexed to);\n bytes32 private constant _TYPEHASH =\n keccak256(\"ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)\");\n\n mapping(address => uint256) private _nonces;\n\n constructor() EIP712(\"MinimalForwarder\", \"0.0.1\") {\n emit ForwarderCreated(address(this));\n }\n\n function getNonce(address from) public view returns (uint256) {\n return _nonces[from];\n }\n\n function getForwarderAddress() public view returns (address) {\n return address(this);\n }\n\n function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) {\n address signer = _hashTypedDataV4(\n keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data)))\n ).recover(signature);\n return _nonces[req.from] == req.nonce && signer == req.from;\n }\n\n function execute(ForwardRequest calldata req, bytes calldata signature) public payable returns (bool, bytes memory) {\n require(verify(req, signature), \"MinimalForwarder: signature does not match request\");\n _nonces[req.from] = req.nonce + 1;\n\n (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}(\n abi.encodePacked(req.data, req.from)\n );\n // Validate that the relayer has sent enough gas for the call.\n // See https://ronan.eth.link/blog/ethereum-gas-dangers/\n assert(gasleft() > req.gas / 63);\n\n emit MetaTransactionExecuted(req.from, req.to);\n return (success, returndata);\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {\n return interfaceId == type(EIP712).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n" + }, + "contracts/library/integration/polygon-bridge/IChildToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// SettleMint.com\n\npragma solidity ^0.8.9;\n\ninterface IChildToken {\n function deposit(address user, bytes calldata depositData) external;\n\n function withdraw(uint256 amount) external;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 52496ec..392413b 100755 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,5 +1,5 @@ import { HardhatUserConfig } from 'hardhat/config'; -// import bpaasConfig from './.secrets/default.hardhat.config'; +import bpaasConfig from './.secrets/default.hardhat.config'; import './tasks/library/graph-config'; import './tasks/library/ipfs-cid'; import './tasks/library/ipfs-upload-file'; @@ -7,8 +7,11 @@ import './tasks/library/opensea-proxy-address'; import './tasks/library/whitelist'; const config: HardhatUserConfig = { - // ...bpaasConfig, + ...bpaasConfig, solidity: '0.8.9', + etherscan: { + apiKey: process.env.ETHERSCAN_API_KEY, + }, }; // If you want to pin your NFT assets, add a token here from https://nft.storage diff --git a/test/Festival.ts b/test/Festival.ts index 16f60c2..47766be 100755 --- a/test/Festival.ts +++ b/test/Festival.ts @@ -7,7 +7,7 @@ describe('Festival', function () { // and reset Hardhat Network to that snapshot in every test. async function deployLockFixture() { // Contracts are deployed using the first signer/account by default - const [ organiser, buyer1, buyer2, buyer3] = await ethers.getSigners(); + const [organiser, buyer1, buyer2, buyer3] = await ethers.getSigners(); // Deploying Festival Token const FestivalToken = await ethers.getContractFactory('FestivalToken'); @@ -15,7 +15,12 @@ describe('Festival', function () { // Deploying Festival NFT const FestivalNFT = await ethers.getContractFactory('FestivalNFT'); - const festivalNFT = await FestivalNFT.connect(organiser).deploy('FestivalNFT', 'FNFT', 'Link to NFT image', festivalToken.address); + const festivalNFT = await FestivalNFT.connect(organiser).deploy( + 'FestivalNFT', + 'FNFT', + 'Link to NFT image', + festivalToken.address + ); return { organiser, buyer1, buyer2, buyer3, festivalToken, festivalNFT }; } @@ -38,7 +43,7 @@ describe('Festival', function () { describe('Check Minting of FTK', function () { it('Minting of tokens from organiser to buyers', async function () { - const { organiser, buyer1, buyer2, buyer3, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, buyer2, buyer3, festivalToken } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK await festivalToken.mint(buyer2.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -64,7 +69,7 @@ describe('Festival', function () { describe('Check Public Minting of FNFT', function () { it('Successful minting of 1 FNFT', async function () { - const { buyer1,festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -144,7 +149,7 @@ describe('Festival', function () { describe('Check Listing of FNFT on Secondary Marketplace', function () { it('Successful listing of 1 FNFT', async function () { - const {buyer1, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -158,7 +163,7 @@ describe('Festival', function () { await festivalNFT.connect(buyer1).publicMint(1); // Approving smart contract to transfer FNFT - await festivalNFT.connect(buyer1).approve(festivalNFT.address,1); + await festivalNFT.connect(buyer1).approve(festivalNFT.address, 1); // Listing 1 FNFT at 11 FTK await festivalNFT.connect(buyer1).setListing(1, ethers.utils.parseUnits('11', 18)); @@ -169,7 +174,7 @@ describe('Festival', function () { }); it('Failure listing of 1 FNFT above 110% Threshold', async function () { - const { buyer1, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -183,7 +188,7 @@ describe('Festival', function () { await festivalNFT.connect(buyer1).publicMint(1); // Approving smart contract to transfer FNFT - await festivalNFT.connect(buyer1).approve(festivalNFT.address,1); + await festivalNFT.connect(buyer1).approve(festivalNFT.address, 1); // Listing 1 FNFT at 12 FTK await expect(festivalNFT.connect(buyer1).setListing(1, ethers.utils.parseUnits('12', 18))).to.be.revertedWith( @@ -192,7 +197,7 @@ describe('Festival', function () { }); it('Successful purchase listing of 1 FNFT ', async function () { - const { buyer1, buyer2, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, buyer2, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK await festivalToken.mint(buyer2.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -208,7 +213,7 @@ describe('Festival', function () { await festivalNFT.connect(buyer1).publicMint(1); // Approving smart contract to transfer FNFT - await festivalNFT.connect(buyer1).approve(festivalNFT.address,1); + await festivalNFT.connect(buyer1).approve(festivalNFT.address, 1); // Listing 1 FNFT at 11 FTK await festivalNFT.connect(buyer1).setListing(1, ethers.utils.parseUnits('11', 18)); @@ -223,7 +228,7 @@ describe('Festival', function () { describe('Check Monetisation', function () { it('Successful monetisation - 10%', async function () { - const {buyer1, buyer2, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); + const { buyer1, buyer2, festivalToken, festivalNFT } = await loadFixture(deployLockFixture); await festivalToken.mint(buyer1.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK await festivalToken.mint(buyer2.address, ethers.utils.parseUnits('1', 20)); // minting 100 FTK @@ -240,7 +245,7 @@ describe('Festival', function () { await festivalNFT.connect(buyer1).publicMint(1); // Approving smart contract to transfer FNFT - await festivalNFT.connect(buyer1).approve(festivalNFT.address,1); + await festivalNFT.connect(buyer1).approve(festivalNFT.address, 1); // Listing 1 FNFT at 11 FTK await festivalNFT.connect(buyer1).setListing(1, ethers.utils.parseUnits('10', 18)); @@ -249,14 +254,10 @@ describe('Festival', function () { await festivalNFT.connect(buyer2).purchaseListing(1, ethers.utils.parseUnits('10', 18)); // Checking FTK balance of buyer1, should be 10% less of 10, note need to deduct the price of public mint - expect(await festivalToken.balanceOf(buyer1.address)).to.equal( - ethers.utils.parseUnits('99', 18) - ); + expect(await festivalToken.balanceOf(buyer1.address)).to.equal(ethers.utils.parseUnits('99', 18)); // Checking FTK balance of buyer2 - expect(await festivalToken.balanceOf(buyer2.address)).to.equal( - ethers.utils.parseUnits('90', 18) - ); + expect(await festivalToken.balanceOf(buyer2.address)).to.equal(ethers.utils.parseUnits('90', 18)); }); }); -}); \ No newline at end of file +});