2024-07-01 16:28:42 +08:00

994 lines
122 KiB
JSON

{
"address": "0xa83e7F65027aE1a8D0687A87dd157394F03456c0",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_duration",
"type": "uint256"
},
{
"internalType": "address",
"name": "_verifier",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "DurationUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "Lock",
"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": true,
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bool",
"name": "isMint",
"type": "bool"
}
],
"indexed": false,
"internalType": "struct NFTLock.NFTInfo[]",
"name": "nftList",
"type": "tuple[]"
}
],
"name": "UnLock",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "verifier",
"type": "address"
}
],
"name": "VerifierUpdated",
"type": "event"
},
{
"inputs": [],
"name": "_CACHED_CHAIN_ID",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "_CACHED_THIS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "nftList",
"type": "address[]"
}
],
"name": "addSupportNftList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "addressOriginal",
"outputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "checkSigner",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "duration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "address",
"name": "_nft",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bool",
"name": "isMint",
"type": "bool"
}
],
"internalType": "struct NFTLock.NFTInfo[]",
"name": "_ids",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "_contract",
"type": "address"
},
{
"internalType": "uint256",
"name": "_chainId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_signTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_saltNonce",
"type": "uint256"
}
],
"name": "getMessageHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "lock",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "lockedNft",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "lockedNum",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxBatch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minDuration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC721Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "passportOriginal",
"outputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nftAddress",
"type": "address"
}
],
"name": "removeSupportNft",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
}
],
"name": "supportNftList",
"outputs": [
{
"internalType": "bool",
"name": "status",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bool",
"name": "isMint",
"type": "bool"
}
],
"internalType": "struct NFTLock.NFTInfo[]",
"name": "nftList",
"type": "tuple[]"
},
{
"internalType": "uint256",
"name": "signTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "saltNonce",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "unlockOrMint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nft",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "unlockWithSvr",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_maxBatch",
"type": "uint256"
}
],
"name": "updateBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "valNew",
"type": "uint256"
}
],
"name": "updateDuation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_verifier",
"type": "address"
}
],
"name": "updateVerifier",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "verifier",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0xc6d3d9fac937c854bbec66f3e0693e78b7f986a527a98524a478a12021e28eee",
"receipt": {
"to": null,
"from": "0x50A8e60041A206AcaA5F844a1104896224be6F39",
"contractAddress": "0xa83e7F65027aE1a8D0687A87dd157394F03456c0",
"transactionIndex": 0,
"gasUsed": "1680994",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000400000000080000000000020000000000000000080000000000000000000020000000000000000000000000000",
"blockHash": "0x488757479a65a2001794630204d3b2360bf30293f3418a87d184b6defa95a888",
"transactionHash": "0xc6d3d9fac937c854bbec66f3e0693e78b7f986a527a98524a478a12021e28eee",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 10417432,
"transactionHash": "0xc6d3d9fac937c854bbec66f3e0693e78b7f986a527a98524a478a12021e28eee",
"address": "0xa83e7F65027aE1a8D0687A87dd157394F03456c0",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x488757479a65a2001794630204d3b2360bf30293f3418a87d184b6defa95a888"
}
],
"blockNumber": 10417432,
"cumulativeGasUsed": "1680994",
"status": 1,
"byzantium": true
},
"args": [
3600,
"0x50A8e60041A206AcaA5F844a1104896224be6F39"
],
"numDeployments": 1,
"solcInputHash": "c7f118a138da16913ccfa4f82e334060",
"metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Lock\",\"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\":true,\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct NFTLock.NFTInfo[]\",\"name\":\"nftList\",\"type\":\"tuple[]\"}],\"name\":\"UnLock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"nftList\",\"type\":\"address[]\"}],\"name\":\"addSupportNftList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"addressOriginal\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nft\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"internalType\":\"struct NFTLock.NFTInfo[]\",\"name\":\"_ids\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"lockedNft\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"lockedNum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"passportOriginal\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nftAddress\",\"type\":\"address\"}],\"name\":\"removeSupportNft\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"}],\"name\":\"supportNftList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"internalType\":\"struct NFTLock.NFTInfo[]\",\"name\":\"nftList\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"unlockOrMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"unlockWithSvr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxBatch\",\"type\":\"uint256\"}],\"name\":\"updateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlockOrMint(address,(uint256,address,bool)[],uint256,uint256,bytes)\":{\"details\":\"unlock or mint nft from passport only if tokenId not exists, mint it if exists and user is owner, unlock it\"},\"unlockWithSvr(address,uint256[])\":{\"details\":\"unlock nft from game svr only\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"lock(address,address,uint256[])\":{\"notice\":\"from eoa or passport\"},\"lockedNum(address,address)\":{\"notice\":\"------get------- *\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/game/NFTLock.sol\":\"NFTLock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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/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/utils/ERC721Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Receiver.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC721Receiver} interface.\\n *\\n * Accepts all token transfers.\\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\\n */\\ncontract ERC721Holder is IERC721Receiver {\\n /**\\n * @dev See {IERC721Receiver-onERC721Received}.\\n *\\n * Always returns `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {\\n return this.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0x67ef46fef257faae47adb630aad49694dda0334e5f7a7c5fb386243b974886b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/game/NFTLock.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ERC721Holder} from \\\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Pausable} from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\n\\ninterface INFT {\\n function mint(address to, uint256 tokenID) external;\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n}\\n\\ncontract NFTLock is ERC721Holder, HasSignature, TimeChecker, Pausable {\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n address public verifier;\\n uint256 public maxBatch = 100;\\n\\n struct NFTInfo {\\n uint256 tokenId;\\n address to;\\n bool isMint;\\n }\\n mapping(address nft => mapping(uint256 tokenId => address user)) public passportOriginal;\\n mapping(address nft => mapping(uint256 tokenId => address user)) public addressOriginal;\\n mapping(address nft => mapping(address user => EnumerableSet.UintSet tokenIdSet)) private lockedRecords;\\n mapping(address nft => bool status) public supportNftList;\\n\\n event UnLock(address indexed nft, address indexed user, uint256 nonce, NFTInfo[] nftList);\\n event Lock(address indexed nft, address indexed sender, address indexed to, uint256[] tokenIds);\\n event VerifierUpdated(address indexed verifier);\\n\\n constructor(uint256 _duration, address _verifier) TimeChecker(_duration) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n verifier = _verifier;\\n }\\n /**\\n * from eoa or passport\\n */\\n function lock(address nft, address to, uint256[] calldata tokenIds) external whenNotPaused{\\n require(tokenIds.length <= maxBatch, \\\"tokenIds too many\\\");\\n require(to != address(0), \\\"not support nft\\\");\\n require(supportNftList[nft], \\\"not support nft\\\");\\n address _sender = _msgSender();\\n for (uint256 i = 0; i < tokenIds.length; i++) {\\n passportOriginal[nft][tokenIds[i]] = to;\\n addressOriginal[nft][tokenIds[i]] = _sender;\\n lockedRecords[nft][to].add(tokenIds[i]);\\n INFT(nft).transferFrom(_sender, address(this), tokenIds[i]);\\n }\\n emit Lock(nft, _sender, to, tokenIds);\\n }\\n /**\\n * @dev unlock or mint nft\\n * from passport only\\n * if tokenId not exists, mint it\\n * if exists and user is owner, unlock it\\n */\\n function unlockOrMint(\\n address nft,\\n NFTInfo[] calldata nftList,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external signatureValid(signature) timeValid(signTime) {\\n require(nftList.length <= maxBatch, \\\"tokenIds too many\\\");\\n address _sender = _msgSender();\\n bytes32 messageHash = getMessageHash(_sender, nft, nftList, _CACHED_THIS, _CACHED_CHAIN_ID, signTime, saltNonce);\\n checkSigner(verifier, messageHash, signature);\\n _useSignature(signature);\\n for (uint256 i = 0; i < nftList.length; i++) {\\n if (nftList[i].isMint) {\\n INFT(nft).mint(nftList[i].to, nftList[i].tokenId);\\n } else {\\n require(passportOriginal[nft][nftList[i].tokenId] == _sender, \\\"not owner\\\");\\n require(addressOriginal[nft][nftList[i].tokenId] == nftList[i].to, \\\"not owner\\\");\\n delete passportOriginal[nft][nftList[i].tokenId];\\n delete addressOriginal[nft][nftList[i].tokenId];\\n lockedRecords[nft][_sender].remove(nftList[i].tokenId);\\n INFT(nft).transferFrom(address(this), nftList[i].to, nftList[i].tokenId);\\n }\\n }\\n emit UnLock(nft, _sender, saltNonce, nftList);\\n }\\n\\n /**\\n * @dev unlock nft\\n * from game svr only\\n */\\n function unlockWithSvr(address nft, uint256[] calldata tokenIds) external onlyOwner{\\n require(tokenIds.length <= maxBatch, \\\"tokenIds too many\\\");\\n for (uint256 i = 0; i < tokenIds.length; i++) {\\n address _sender = addressOriginal[nft][tokenIds[i]];\\n delete passportOriginal[nft][tokenIds[i]];\\n delete addressOriginal[nft][tokenIds[i]];\\n lockedRecords[nft][_sender].remove(tokenIds[i]);\\n INFT(nft).transferFrom(address(this), _sender, tokenIds[i]);\\n }\\n }\\n\\n /** ------get------- **/\\n function lockedNum(address token, address user) public view returns (uint256) {\\n return lockedRecords[token][user].length();\\n }\\n\\n function lockedNft(address token, address user) public view returns (uint256[] memory) {\\n return lockedRecords[token][user].values();\\n }\\n\\n function updateBatch(uint256 _maxBatch) external onlyOwner {\\n maxBatch = _maxBatch;\\n }\\n\\n function addSupportNftList(address[] calldata nftList) external onlyOwner {\\n for (uint256 i = 0; i < nftList.length; i++) {\\n supportNftList[nftList[i]] = true;\\n }\\n }\\n function removeSupportNft(address nftAddress) external onlyOwner {\\n require(supportNftList[nftAddress], \\\"can't remove\\\");\\n delete supportNftList[nftAddress];\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"NFTClaimer: address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n\\n function getMessageHash(\\n address _to,\\n address _nft,\\n NFTInfo[] memory _ids,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(_to, _nft, _contract, _chainId, _signTime, _saltNonce);\\n for (uint256 i = 0; i < _ids.length; ++i) {\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].tokenId));\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].to));\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].isMint));\\n }\\n return keccak256(encoded);\\n }\\n}\\n\",\"keccak256\":\"0x578e51f062c2dac690c9efb7279ceb1d8715ddeef6b1fed5bb4ffe58fd8af2be\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60c0346100fb57601f611c6b38819003918201601f19168301916001600160401b038311848410176101005780849260409485528339810103126100fb5780516020909101516001600160a01b039182821682036100fb576000543360018060a01b0319821617600055604051933391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3600255610708600355600480546064600555466080523060a0526001600160a81b03191660089290921b610100600160a81b0316919091179055611b54908161011782396080518181816109840152610fd7015260a05181818161021b01526109a60152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604081815260048036101561001557600080fd5b600092833560e01c9081630fb5a6b4146112015750806312750292146111c3578063150b7a021461116e578063230fb7fe14610ffa5780632b437d4814610fbf5780632b7ac3f314610f9457806338e2c2eb14610f725780635671576114610f535780635c975abb14610f305780635fb110ca14610ea957806367765b8714610e8a5780636d04319414610e3d578063715018a614610de357806376bd0cfd14610890578063799048fa146108075780637f9d30961461077b5780638da5cb5b1461075357806397fc007c1461068a5780639a14da5814610646578063a0634724146105fd578063bdfe78c9146105b9578063c419028f146103a0578063ce3d1b2d14610313578063d13344c91461024e578063da28b527146102065763f2fde38b1461014157600080fd5b346102025760203660031901126102025761015a61121d565b9061016361141d565b6001600160a01b039182169283156101b057505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461024a578160031936011261024a57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b8284346103105781600319360112610310579061026961121d565b91610272611238565b6001600160a01b039384168252600860209081528383209190941682528352818120825181548082529183528483208186019392849190845b8181106102fc57505050816102c19103826112a6565b83519485948186019282875251809352850193925b8281106102e557505050500390f35b8351855286955093810193928101926001016102d6565b8254845292880192600192830192016102ab565b80fd5b50346102025760e03660031901126102025761032d61121d565b610335611238565b91604435906001600160401b03821161039c573660238301121561039c5781602461036593369301359101611368565b93606435906001600160a01b0382168203610310575091602094916103959360c4359360a4359360843593611a0d565b9051908152f35b8580fd5b5034610202576060366003190112610202576103ba61121d565b916103c3611238565b916044356001600160401b03811161039c576103e2903690830161132b565b91909360ff825416610583576103fc6005548411156116e5565b6001600160a01b0390811695610413871515611725565b16928387526020916009835261042e60ff838a205416611725565b875b84811061048d57505080518281529182018390526001600160fb1b038311610489577f356278d4d01db4ac9a53decc4eeeceecfb494d3bd0c463b305d33e65305e2bf29260051b8095828401378133958101030190a480f35b8680fd5b858952600684528289206104a282878a611788565b358a52845282892080546001600160a01b03199081168a17909155868a5260078552838a206104d283888b611788565b358b528552838a2090339082541617905585895260088452828920888a52845261050a838a2061050383888b611788565b35906117c6565b50610516818689611788565b3589873b156103105784516323b872dd60e01b815233858201908152306020820152604081019390935291829081906060010381838b5af180156105795790610565929161056a575b50611763565b610430565b61057390611262565b3861055f565b84513d8c823e3d90fd5b835162461bcd60e51b8152602081840152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b50503461024a578060031936011261024a576020916001600160a01b03908290826105e261121d565b16815260078552818120602435825285522054169051908152f35b50503461024a578060031936011261024a578060209261061b61121d565b610623611238565b6001600160a01b0391821683526008865283832091168252845220549051908152f35b50503461024a578060031936011261024a576020916001600160a01b039082908261066f61121d565b16815260068552818120602435825285522054169051908152f35b5034610202576020366003190112610202576106a461121d565b6106ac61141d565b6001600160a01b03811692831561070557508154610100600160a81b03191660089190911b610100600160a81b03161790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b5162461bcd60e51b8152602081840152602360248201527f4e4654436c61696d65723a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b50503461024a578160031936011261024a57905490516001600160a01b039091168152602090f35b50346102025760203660031901126102025780359161079861141d565b6003548311156107cf575050806002557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b50346102025760203660031901126102025761082161121d565b61082961141d565b6001600160a01b031680845260096020528284205490919060ff161561085e5750825260096020528120805460ff1916905580f35b606490602084519162461bcd60e51b8352820152600c60248201526b63616e27742072656d6f766560a01b6044820152fd5b5090346102025760a0366003190112610202576108ab61121d565b916024916001600160401b039083358281116104895736602382011215610489578084013590838211610ddf5785810195606091813691848602010111610ddb576044938435946064359760843591888311610dd75736602384011215610dd75782820135988911610dd75784830192858a3692010111610dd757835194898487378986019860ff8760019b8c81526020998a91030190205416610d65576002548101808211610d52574211610ceb57908d8f93928d908f6005548d1115610972906116e5565b8c369061097e92611368565b6109cc937f0000000000000000000000000000000000000000000000000000000000000000917f00000000000000000000000000000000000000000000000000000000000000009133611a0d565b9a87855496366109dd9084836112c7565b9d600160a01b600190039e8f60089a8b1c16916109f992611475565b885182818f86858337868201908152030190205460ff1615610cc8575b505050829998979695995b8d898210610abc57505050505050508285519786890190895286838a01525281870197948a915b848310610a7d578b33898d167f9a5ba7d70cc7e1cd613eb99e6ed8ea301d889773c9d4517218560eee5153803e8c8e038da380f35b90919293948480889b610aa7868b869c3584528d610a9c89830161124e565b16888501520161135b565b151581870152019a0196959493019190610a48565b9a610acd828b839a9b9c9d9e611850565b01358015158103610cc4578f8f9190898f928e8d878b93600014610b6757505050505016610b11838d610b0b8d610b05848489611850565b01611898565b94611850565b3591813b1561048957858f918880948d5196879586946340c10f1960e01b8652168d850152898401525af18015610b5d5790610b52929161056a5750611763565b999897969599610a21565b88513d87823e3d90fd5b8691610b05610bd1928487999a610bd898999c9b169b8c8a528b610b94848a8460069e8f8b522093611850565b358c528552610baa8b8383339220541614611860565b8c8b5260079a8b86528c610bc2858b85852093611850565b3582528652205416958a611850565b1614611860565b8388528b52898720610beb858f85611850565b3588528b5289872080546001600160a01b0319908116909155838852908b52898720610c18858f85611850565b3588528b52898720908154169055818652878a528886203387528a52610c4d8c610c46858c8a209285611850565b35906118ac565b50610c68838d610c628d610b05848488611850565b93611850565b35823b156104895789516323b872dd60e01b815230818a019081526001600160a01b039093166020840152604083019190915291869183919082908490829060600103925af18015610b5d5790610b52929161056a5750611763565b8480fd5b828951938492833781018d815203019020805460ff19168b179055388781610a16565b855162461bcd60e51b8152808501889052603b818401527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818501527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b5050634e487b7160e01b8e52601183528dfd5b855162461bcd60e51b81528085018890526042818401527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818501527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b8c80fd5b8880fd5b8780fd5b8334610310578060031936011261031057610dfc61141d565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83823461024a57606036600319011261024a57610e5861121d565b6044356001600160401b038111610e8657610e8392610e799136910161130d565b9060243590611475565b80f35b8380fd5b50503461024a578160031936011261024a576020906005549051908152f35b5090346102025760209182600319360112610e86578035906001600160401b038211610cc457610edb9136910161132b565b9290610ee561141d565b845b848110610ef2578580f35b610f2b906001600160a01b03610f11610f0c838987611788565b611898565b16875260098452848720805460ff19166001179055611763565b610ee7565b5091346103105780600319360112610310575060ff602092541690519015158152f35b50503461024a578160031936011261024a576020906003549051908152f35b83823461024a57602036600319011261024a57610f8d61141d565b3560055580f35b503461020257826003193601126102025754905160089190911c6001600160a01b0316815260209150f35b50503461024a578160031936011261024a57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461020257816003193601126102025761101361121d565b91836024356001600160401b03811161024a57611033903690850161132b565b61103e95919561141d565b61104c6005548211156116e5565b6001600160a01b0391821690835b818110611065578480f35b8285526007602081815287872061107d84868d611788565b358852815285888820541691858852600682528a61109f85878c8c2093611788565b358952825288882080546001600160a01b03199081169091558689529082528888206110cc85878e611788565b35895282528888209081541690558487526008815287872090828852526110fa878720610c4684868d611788565b5061110682848b611788565b3590843b156104895787516323b872dd60e01b8152308a82019081526001600160a01b0390921660208301526040820192909252869082908190606001038183885af18015611164579061115f929161056a5750611763565b61105a565b87513d88823e3d90fd5b5091346103105760803660031901126103105761118961121d565b50611192611238565b50606435906001600160401b03821161031057506020926111b59136910161130d565b5051630a85bd0160e11b8152f35b50503461024a57602036600319011261024a5760209160ff9082906001600160a01b036111ee61121d565b1681526009855220541690519015158152f35b84903461024a578160031936011261024a576020906002548152f35b600435906001600160a01b038216820361123357565b600080fd5b602435906001600160a01b038216820361123357565b35906001600160a01b038216820361123357565b6001600160401b03811161127557604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761127557604052565b90601f801991011681019081106001600160401b0382111761127557604052565b9291926001600160401b03821161127557604051916112f0601f8201601f1916602001846112a6565b829481845281830111611233578281602093846000960137010152565b9080601f8301121561123357816020611328933591016112c7565b90565b9181601f84011215611233578235916001600160401b038311611233576020808501948460051b01011161123357565b3590811515820361123357565b6001600160401b03939284831161127557604090815195602092611391848760051b01896112a6565b83888781520192606080970286019581871161123357935b8685106113ba575050505050505050565b878583031261123357825190888201908282108683111761140857899288928652873581526113ea83890161124e565b838201526113f986890161135b565b868201528152019401936113a9565b60246000634e487b7160e01b81526041600452fd5b6000546001600160a01b0316330361143157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b906114b7926114af917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c60002061161e565b929092611504565b6001600160a01b039081169116036114cb57565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b600581101561160857806115155750565b600181036115625760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b600281036115af5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146115b857565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461164c57611648916020820151906060604084015193015160001a90611656565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116116d95791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156116cc5781516001600160a01b038116156116c6579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b156116ec57565b60405162461bcd60e51b8152602060048201526011602482015270746f6b656e49647320746f6f206d616e7960781b6044820152606490fd5b1561172c57565b60405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081cdd5c1c1bdc9d081b999d608a1b6044820152606490fd5b60001981146117725760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156117985760051b0190565b634e487b7160e01b600052603260045260246000fd5b80548210156117985760005260206000200190600090565b9190600183016000908282528060205260408220541560001461184a5784549468010000000000000000861015611836578361182661180f886001604098999a018555846117ae565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b9190811015611798576060020190565b1561186757565b60405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606490fd5b356001600160a01b03811681036112335790565b9060018201906000928184528260205260408420549081151560001461199557600019918083018181116119815782549084820191821161196d57808203611938575b505050805480156119245782019161190783836117ae565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b61195861194861180f93866117ae565b90549060031b1c928392866117ae565b905586528460205260408620553880806118ef565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b80518210156117985760209160051b010190565b9081519160005b8381106119c8575050016000815290565b80602080928401015181850152016119b7565b611a0b906119fd6119f7949360405195869360208501906119b0565b906119b0565b03601f1981018452836112a6565b565b939092919496956040978851926bffffffffffffffffffffffff198095816060988160209b8b1b168b890152891b166034870152871b166048850152605c840152607c830152609c820152609c815260c081018181106001600160401b038211176112755787526000905b8551821015611b0e57611b02611ada611ab3611b0893611a98868b61199c565b5151908c51918a830152898252611aae8261128b565b6119db565b87611abe868b61199c565b51015190868c5192891b168983015260148252611aae8261128b565b89611ae5858a61199c565b5101511515908a519160f81b8883015260018252611aae8261128b565b91611763565b90611a78565b959650505050905081519101209056fea26469706673582212202ec6c1dbc7ff13a84f5b0a731d10b9e918fc8edf4084e389bbf967e329f2e5c964736f6c63430008130033",
"deployedBytecode": "0x6080604081815260048036101561001557600080fd5b600092833560e01c9081630fb5a6b4146112015750806312750292146111c3578063150b7a021461116e578063230fb7fe14610ffa5780632b437d4814610fbf5780632b7ac3f314610f9457806338e2c2eb14610f725780635671576114610f535780635c975abb14610f305780635fb110ca14610ea957806367765b8714610e8a5780636d04319414610e3d578063715018a614610de357806376bd0cfd14610890578063799048fa146108075780637f9d30961461077b5780638da5cb5b1461075357806397fc007c1461068a5780639a14da5814610646578063a0634724146105fd578063bdfe78c9146105b9578063c419028f146103a0578063ce3d1b2d14610313578063d13344c91461024e578063da28b527146102065763f2fde38b1461014157600080fd5b346102025760203660031901126102025761015a61121d565b9061016361141d565b6001600160a01b039182169283156101b057505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461024a578160031936011261024a57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b8284346103105781600319360112610310579061026961121d565b91610272611238565b6001600160a01b039384168252600860209081528383209190941682528352818120825181548082529183528483208186019392849190845b8181106102fc57505050816102c19103826112a6565b83519485948186019282875251809352850193925b8281106102e557505050500390f35b8351855286955093810193928101926001016102d6565b8254845292880192600192830192016102ab565b80fd5b50346102025760e03660031901126102025761032d61121d565b610335611238565b91604435906001600160401b03821161039c573660238301121561039c5781602461036593369301359101611368565b93606435906001600160a01b0382168203610310575091602094916103959360c4359360a4359360843593611a0d565b9051908152f35b8580fd5b5034610202576060366003190112610202576103ba61121d565b916103c3611238565b916044356001600160401b03811161039c576103e2903690830161132b565b91909360ff825416610583576103fc6005548411156116e5565b6001600160a01b0390811695610413871515611725565b16928387526020916009835261042e60ff838a205416611725565b875b84811061048d57505080518281529182018390526001600160fb1b038311610489577f356278d4d01db4ac9a53decc4eeeceecfb494d3bd0c463b305d33e65305e2bf29260051b8095828401378133958101030190a480f35b8680fd5b858952600684528289206104a282878a611788565b358a52845282892080546001600160a01b03199081168a17909155868a5260078552838a206104d283888b611788565b358b528552838a2090339082541617905585895260088452828920888a52845261050a838a2061050383888b611788565b35906117c6565b50610516818689611788565b3589873b156103105784516323b872dd60e01b815233858201908152306020820152604081019390935291829081906060010381838b5af180156105795790610565929161056a575b50611763565b610430565b61057390611262565b3861055f565b84513d8c823e3d90fd5b835162461bcd60e51b8152602081840152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b50503461024a578060031936011261024a576020916001600160a01b03908290826105e261121d565b16815260078552818120602435825285522054169051908152f35b50503461024a578060031936011261024a578060209261061b61121d565b610623611238565b6001600160a01b0391821683526008865283832091168252845220549051908152f35b50503461024a578060031936011261024a576020916001600160a01b039082908261066f61121d565b16815260068552818120602435825285522054169051908152f35b5034610202576020366003190112610202576106a461121d565b6106ac61141d565b6001600160a01b03811692831561070557508154610100600160a81b03191660089190911b610100600160a81b03161790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b5162461bcd60e51b8152602081840152602360248201527f4e4654436c61696d65723a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b50503461024a578160031936011261024a57905490516001600160a01b039091168152602090f35b50346102025760203660031901126102025780359161079861141d565b6003548311156107cf575050806002557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b50346102025760203660031901126102025761082161121d565b61082961141d565b6001600160a01b031680845260096020528284205490919060ff161561085e5750825260096020528120805460ff1916905580f35b606490602084519162461bcd60e51b8352820152600c60248201526b63616e27742072656d6f766560a01b6044820152fd5b5090346102025760a0366003190112610202576108ab61121d565b916024916001600160401b039083358281116104895736602382011215610489578084013590838211610ddf5785810195606091813691848602010111610ddb576044938435946064359760843591888311610dd75736602384011215610dd75782820135988911610dd75784830192858a3692010111610dd757835194898487378986019860ff8760019b8c81526020998a91030190205416610d65576002548101808211610d52574211610ceb57908d8f93928d908f6005548d1115610972906116e5565b8c369061097e92611368565b6109cc937f0000000000000000000000000000000000000000000000000000000000000000917f00000000000000000000000000000000000000000000000000000000000000009133611a0d565b9a87855496366109dd9084836112c7565b9d600160a01b600190039e8f60089a8b1c16916109f992611475565b885182818f86858337868201908152030190205460ff1615610cc8575b505050829998979695995b8d898210610abc57505050505050508285519786890190895286838a01525281870197948a915b848310610a7d578b33898d167f9a5ba7d70cc7e1cd613eb99e6ed8ea301d889773c9d4517218560eee5153803e8c8e038da380f35b90919293948480889b610aa7868b869c3584528d610a9c89830161124e565b16888501520161135b565b151581870152019a0196959493019190610a48565b9a610acd828b839a9b9c9d9e611850565b01358015158103610cc4578f8f9190898f928e8d878b93600014610b6757505050505016610b11838d610b0b8d610b05848489611850565b01611898565b94611850565b3591813b1561048957858f918880948d5196879586946340c10f1960e01b8652168d850152898401525af18015610b5d5790610b52929161056a5750611763565b999897969599610a21565b88513d87823e3d90fd5b8691610b05610bd1928487999a610bd898999c9b169b8c8a528b610b94848a8460069e8f8b522093611850565b358c528552610baa8b8383339220541614611860565b8c8b5260079a8b86528c610bc2858b85852093611850565b3582528652205416958a611850565b1614611860565b8388528b52898720610beb858f85611850565b3588528b5289872080546001600160a01b0319908116909155838852908b52898720610c18858f85611850565b3588528b52898720908154169055818652878a528886203387528a52610c4d8c610c46858c8a209285611850565b35906118ac565b50610c68838d610c628d610b05848488611850565b93611850565b35823b156104895789516323b872dd60e01b815230818a019081526001600160a01b039093166020840152604083019190915291869183919082908490829060600103925af18015610b5d5790610b52929161056a5750611763565b8480fd5b828951938492833781018d815203019020805460ff19168b179055388781610a16565b855162461bcd60e51b8152808501889052603b818401527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818501527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b5050634e487b7160e01b8e52601183528dfd5b855162461bcd60e51b81528085018890526042818401527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818501527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b8c80fd5b8880fd5b8780fd5b8334610310578060031936011261031057610dfc61141d565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83823461024a57606036600319011261024a57610e5861121d565b6044356001600160401b038111610e8657610e8392610e799136910161130d565b9060243590611475565b80f35b8380fd5b50503461024a578160031936011261024a576020906005549051908152f35b5090346102025760209182600319360112610e86578035906001600160401b038211610cc457610edb9136910161132b565b9290610ee561141d565b845b848110610ef2578580f35b610f2b906001600160a01b03610f11610f0c838987611788565b611898565b16875260098452848720805460ff19166001179055611763565b610ee7565b5091346103105780600319360112610310575060ff602092541690519015158152f35b50503461024a578160031936011261024a576020906003549051908152f35b83823461024a57602036600319011261024a57610f8d61141d565b3560055580f35b503461020257826003193601126102025754905160089190911c6001600160a01b0316815260209150f35b50503461024a578160031936011261024a57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461020257816003193601126102025761101361121d565b91836024356001600160401b03811161024a57611033903690850161132b565b61103e95919561141d565b61104c6005548211156116e5565b6001600160a01b0391821690835b818110611065578480f35b8285526007602081815287872061107d84868d611788565b358852815285888820541691858852600682528a61109f85878c8c2093611788565b358952825288882080546001600160a01b03199081169091558689529082528888206110cc85878e611788565b35895282528888209081541690558487526008815287872090828852526110fa878720610c4684868d611788565b5061110682848b611788565b3590843b156104895787516323b872dd60e01b8152308a82019081526001600160a01b0390921660208301526040820192909252869082908190606001038183885af18015611164579061115f929161056a5750611763565b61105a565b87513d88823e3d90fd5b5091346103105760803660031901126103105761118961121d565b50611192611238565b50606435906001600160401b03821161031057506020926111b59136910161130d565b5051630a85bd0160e11b8152f35b50503461024a57602036600319011261024a5760209160ff9082906001600160a01b036111ee61121d565b1681526009855220541690519015158152f35b84903461024a578160031936011261024a576020906002548152f35b600435906001600160a01b038216820361123357565b600080fd5b602435906001600160a01b038216820361123357565b35906001600160a01b038216820361123357565b6001600160401b03811161127557604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761127557604052565b90601f801991011681019081106001600160401b0382111761127557604052565b9291926001600160401b03821161127557604051916112f0601f8201601f1916602001846112a6565b829481845281830111611233578281602093846000960137010152565b9080601f8301121561123357816020611328933591016112c7565b90565b9181601f84011215611233578235916001600160401b038311611233576020808501948460051b01011161123357565b3590811515820361123357565b6001600160401b03939284831161127557604090815195602092611391848760051b01896112a6565b83888781520192606080970286019581871161123357935b8685106113ba575050505050505050565b878583031261123357825190888201908282108683111761140857899288928652873581526113ea83890161124e565b838201526113f986890161135b565b868201528152019401936113a9565b60246000634e487b7160e01b81526041600452fd5b6000546001600160a01b0316330361143157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b906114b7926114af917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c60002061161e565b929092611504565b6001600160a01b039081169116036114cb57565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b600581101561160857806115155750565b600181036115625760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b600281036115af5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146115b857565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461164c57611648916020820151906060604084015193015160001a90611656565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116116d95791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156116cc5781516001600160a01b038116156116c6579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b156116ec57565b60405162461bcd60e51b8152602060048201526011602482015270746f6b656e49647320746f6f206d616e7960781b6044820152606490fd5b1561172c57565b60405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081cdd5c1c1bdc9d081b999d608a1b6044820152606490fd5b60001981146117725760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156117985760051b0190565b634e487b7160e01b600052603260045260246000fd5b80548210156117985760005260206000200190600090565b9190600183016000908282528060205260408220541560001461184a5784549468010000000000000000861015611836578361182661180f886001604098999a018555846117ae565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b9190811015611798576060020190565b1561186757565b60405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606490fd5b356001600160a01b03811681036112335790565b9060018201906000928184528260205260408420549081151560001461199557600019918083018181116119815782549084820191821161196d57808203611938575b505050805480156119245782019161190783836117ae565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b61195861194861180f93866117ae565b90549060031b1c928392866117ae565b905586528460205260408620553880806118ef565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b80518210156117985760209160051b010190565b9081519160005b8381106119c8575050016000815290565b80602080928401015181850152016119b7565b611a0b906119fd6119f7949360405195869360208501906119b0565b906119b0565b03601f1981018452836112a6565b565b939092919496956040978851926bffffffffffffffffffffffff198095816060988160209b8b1b168b890152891b166034870152871b166048850152605c840152607c830152609c820152609c815260c081018181106001600160401b038211176112755787526000905b8551821015611b0e57611b02611ada611ab3611b0893611a98868b61199c565b5151908c51918a830152898252611aae8261128b565b6119db565b87611abe868b61199c565b51015190868c5192891b168983015260148252611aae8261128b565b89611ae5858a61199c565b5101511515908a519160f81b8883015260018252611aae8261128b565b91611763565b90611a78565b959650505050905081519101209056fea26469706673582212202ec6c1dbc7ff13a84f5b0a731d10b9e918fc8edf4084e389bbf967e329f2e5c964736f6c63430008130033",
"devdoc": {
"events": {
"Paused(address)": {
"details": "Emitted when the pause is triggered by `account`."
},
"Unpaused(address)": {
"details": "Emitted when the pause is lifted by `account`."
}
},
"kind": "dev",
"methods": {
"onERC721Received(address,address,uint256,bytes)": {
"details": "See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`."
},
"owner()": {
"details": "Returns the address of the current owner."
},
"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. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
},
"unlockOrMint(address,(uint256,address,bool)[],uint256,uint256,bytes)": {
"details": "unlock or mint nft from passport only if tokenId not exists, mint it if exists and user is owner, unlock it"
},
"unlockWithSvr(address,uint256[])": {
"details": "unlock nft from game svr only"
},
"updateDuation(uint256)": {
"details": "Change duration value"
},
"updateVerifier(address)": {
"details": "update verifier address"
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"lock(address,address,uint256[])": {
"notice": "from eoa or passport"
},
"lockedNum(address,address)": {
"notice": "------get------- *"
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 7,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 2486,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_usedSignatures",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes_memory_ptr,t_bool)"
},
{
"astId": 3292,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "duration",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 3294,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "minDuration",
"offset": 0,
"slot": "3",
"type": "t_uint256"
},
{
"astId": 130,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_paused",
"offset": 0,
"slot": "4",
"type": "t_bool"
},
{
"astId": 2598,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "verifier",
"offset": 1,
"slot": "4",
"type": "t_address"
},
{
"astId": 2601,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "maxBatch",
"offset": 0,
"slot": "5",
"type": "t_uint256"
},
{
"astId": 2614,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "passportOriginal",
"offset": 0,
"slot": "6",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_address))"
},
{
"astId": 2620,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "addressOriginal",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_address))"
},
{
"astId": 2627,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "lockedRecords",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_address,t_mapping(t_address,t_struct(UintSet)2344_storage))"
},
{
"astId": 2631,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "supportNftList",
"offset": 0,
"slot": "9",
"type": "t_mapping(t_address,t_bool)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_bytes32)dyn_storage": {
"base": "t_bytes32",
"encoding": "dynamic_array",
"label": "bytes32[]",
"numberOfBytes": "32"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_bytes_memory_ptr": {
"encoding": "bytes",
"label": "bytes",
"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_struct(UintSet)2344_storage))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(address => struct EnumerableSet.UintSet))",
"numberOfBytes": "32",
"value": "t_mapping(t_address,t_struct(UintSet)2344_storage)"
},
"t_mapping(t_address,t_mapping(t_uint256,t_address))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(uint256 => address))",
"numberOfBytes": "32",
"value": "t_mapping(t_uint256,t_address)"
},
"t_mapping(t_address,t_struct(UintSet)2344_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => struct EnumerableSet.UintSet)",
"numberOfBytes": "32",
"value": "t_struct(UintSet)2344_storage"
},
"t_mapping(t_bytes32,t_uint256)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_mapping(t_bytes_memory_ptr,t_bool)": {
"encoding": "mapping",
"key": "t_bytes_memory_ptr",
"label": "mapping(bytes => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_uint256,t_address)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => address)",
"numberOfBytes": "32",
"value": "t_address"
},
"t_struct(Set)1872_storage": {
"encoding": "inplace",
"label": "struct EnumerableSet.Set",
"members": [
{
"astId": 1867,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_values",
"offset": 0,
"slot": "0",
"type": "t_array(t_bytes32)dyn_storage"
},
{
"astId": 1871,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_indexes",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_uint256)"
}
],
"numberOfBytes": "64"
},
"t_struct(UintSet)2344_storage": {
"encoding": "inplace",
"label": "struct EnumerableSet.UintSet",
"members": [
{
"astId": 2343,
"contract": "contracts/game/NFTLock.sol:NFTLock",
"label": "_inner",
"offset": 0,
"slot": "0",
"type": "t_struct(Set)1872_storage"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}