CounterFire2023 59b6fc8f34 init
2024-05-29 13:22:36 +08:00

694 lines
89 KiB
JSON

{
"address": "0xB469331cEC98E52b7Eab07dFB586253bE232BBF7",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "action",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "ActionEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "DurationUpdated",
"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": "bool",
"name": "isPaused",
"type": "bool"
}
],
"name": "StateUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "verifier",
"type": "address"
}
],
"name": "VerifierUpdated",
"type": "event"
},
{
"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": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "checkinHistory",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "claimTaskHistory",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "taskId",
"type": "uint256"
}
],
"name": "claimTaskReward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "dailyCheckin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "duration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "boxId",
"type": "uint256"
}
],
"name": "enhanceBox",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "enhanceHistory",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "step",
"type": "uint256"
}
],
"name": "explore",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "exploreHistory",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "actionType",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "val",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "signTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "saltNonce",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "generalAction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_user",
"type": "address"
},
{
"internalType": "uint256",
"name": "_type",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_val",
"type": "uint256"
},
{
"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": [],
"name": "isPaused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minDuration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "boxId",
"type": "uint256"
}
],
"name": "openBox",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "openBoxHistory",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "valNew",
"type": "uint256"
}
],
"name": "updateDuation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "_isPaused",
"type": "bool"
}
],
"name": "updatePaused",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_verifier",
"type": "address"
}
],
"name": "updateVerifier",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x420f3992f84d40f300eb00ac68b0015c7119b3c59b1351d72115ba5db02b99b6",
"receipt": {
"to": null,
"from": "0x50A8e60041A206AcaA5F844a1104896224be6F39",
"contractAddress": "0xB469331cEC98E52b7Eab07dFB586253bE232BBF7",
"transactionIndex": 0,
"gasUsed": "1394013",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000080000000000000000000000000000080000000000020000000000000000000000000000000000000020000000000000000000000000000",
"blockHash": "0x058eb866ed7168aa8f6773aade133bda5ed284dc94f98b256a2a2651540a0e0b",
"transactionHash": "0x420f3992f84d40f300eb00ac68b0015c7119b3c59b1351d72115ba5db02b99b6",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 8909541,
"transactionHash": "0x420f3992f84d40f300eb00ac68b0015c7119b3c59b1351d72115ba5db02b99b6",
"address": "0xB469331cEC98E52b7Eab07dFB586253bE232BBF7",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x058eb866ed7168aa8f6773aade133bda5ed284dc94f98b256a2a2651540a0e0b"
}
],
"blockNumber": 8909541,
"cumulativeGasUsed": "1394013",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "5bb31bf450538abe4300b257a34b7688",
"metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"action\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ActionEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"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\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"StateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkinHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimTaskHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"taskId\",\"type\":\"uint256\"}],\"name\":\"claimTaskReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyCheckin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"boxId\",\"type\":\"uint256\"}],\"name\":\"enhanceBox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"enhanceHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"step\",\"type\":\"uint256\"}],\"name\":\"explore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"exploreHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actionType\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"val\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"generalAction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_type\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_val\",\"type\":\"uint256\"},{\"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\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"boxId\",\"type\":\"uint256\"}],\"name\":\"openBox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"openBoxHistory\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_isPaused\",\"type\":\"bool\"}],\"name\":\"updatePaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/activity/TreasureHunt.sol\":\"TreasureHunt\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"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\"},\"contracts/activity/TreasureHunt.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.23;\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../core/HasSignature.sol\\\";\\nimport \\\"../utils/TimeChecker.sol\\\";\\n\\n\\ncontract TreasureHunt is HasSignature, ReentrancyGuard, TimeChecker{\\n mapping(address => mapping(uint256 => uint256)) public checkinHistory;\\n mapping(address => mapping(uint256 => uint256)) public exploreHistory;\\n mapping(address => mapping(uint256 => uint256)) public enhanceHistory;\\n mapping(address => mapping(uint256 => uint256)) public claimTaskHistory;\\n mapping(address => mapping(uint256 => uint256)) public openBoxHistory;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n address private immutable _CACHED_THIS;\\n address private verifier;\\n\\n bool public isPaused = false;\\n\\n event ActionEvent(\\n address indexed user,\\n uint256 indexed action,\\n uint256 value\\n );\\n\\n event StateUpdated(bool isPaused);\\n event VerifierUpdated(address indexed verifier);\\n\\n constructor() {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n }\\n\\n modifier whenNotPaused() {\\n require(!isPaused, \\\"TreasureHunt: paused\\\");\\n _;\\n }\\n\\n function updatePaused(bool _isPaused) external onlyOwner {\\n isPaused = _isPaused;\\n emit StateUpdated(_isPaused);\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"TreasureHunt: address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n \\n // daily checkin\\n function dailyCheckin() external whenNotPaused {\\n address user = _msgSender();\\n uint256 day = block.timestamp / 1 days;\\n require(checkinHistory[user][day] == 0, \\\"TreasureHunt: already checked in\\\");\\n checkinHistory[user][day] = 1;\\n emit ActionEvent(user, 1, day);\\n }\\n\\n // explore\\n function explore(\\n uint256 step\\n ) external whenNotPaused {\\n address user = _msgSender();\\n exploreHistory[user][step] = 1;\\n emit ActionEvent(user, 2, step);\\n } \\n\\n // enhance box\\n function enhanceBox(\\n uint256 boxId\\n ) external whenNotPaused {\\n address user = _msgSender();\\n require(enhanceHistory[user][boxId] == 0, \\\"TreasureHunt: already enhanced\\\");\\n enhanceHistory[user][boxId] = 1;\\n emit ActionEvent(user, 3, boxId);\\n } \\n\\n // open box\\n function openBox(\\n uint256 boxId\\n ) external whenNotPaused {\\n address user = _msgSender();\\n require(openBoxHistory[user][boxId] == 0, \\\"TreasureHunt: already opened\\\");\\n openBoxHistory[user][boxId] = 1;\\n emit ActionEvent(user, 4, boxId);\\n }\\n\\n // claim task reward\\n function claimTaskReward(\\n uint256 taskId\\n ) external whenNotPaused{\\n address user = _msgSender();\\n require(claimTaskHistory[user][taskId] == 0, \\\"TreasureHunt: already claimed\\\");\\n claimTaskHistory[user][taskId] = 1;\\n emit ActionEvent(user, 5, taskId);\\n } \\n\\n function generalAction(\\n uint256 actionType,\\n uint256 val,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external nonReentrant whenNotPaused timeValid(signTime){\\n address user = _msgSender();\\n bytes32 criteriaMessageHash = getMessageHash(\\n user,\\n actionType,\\n val,\\n _CACHED_THIS,\\n _CACHED_CHAIN_ID,\\n signTime,\\n saltNonce\\n );\\n checkSigner(verifier, criteriaMessageHash, signature);\\n if (actionType == 1) {\\n require(checkinHistory[user][val] == 0, \\\"TreasureHunt: already checked in\\\");\\n checkinHistory[user][val] = 1;\\n } else if (actionType == 2) {\\n require(exploreHistory[user][val] == 0, \\\"TreasureHunt: already explored\\\");\\n exploreHistory[user][val] = 1;\\n } else if (actionType == 3) {\\n require(enhanceHistory[user][val] == 0, \\\"TreasureHunt: already enhanced\\\");\\n enhanceHistory[user][val] = 1;\\n } else if (actionType == 4) {\\n require(openBoxHistory[user][val] == 0, \\\"TreasureHunt: already opened\\\");\\n openBoxHistory[user][val] = 1;\\n } else if (actionType == 5) {\\n require(claimTaskHistory[user][val] == 0, \\\"TreasureHunt: already claimed\\\");\\n claimTaskHistory[user][val] = 1;\\n } else {\\n revert(\\\"TreasureHunt: invalid action type\\\");\\n }\\n emit ActionEvent(user, actionType, val);\\n }\\n\\n function getMessageHash(\\n address _user,\\n uint256 _type,\\n uint256 _val,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(\\n _user,\\n _type,\\n _val,\\n _contract,\\n _chainId,\\n _signTime,\\n _saltNonce\\n );\\n return keccak256(encoded);\\n }\\n}\\n\",\"keccak256\":\"0xc387335e0711f99c0fc1d209a962dea7ad3b864f9b2e23c6fdc876c8f572f13a\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.23;\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes => bool) 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, \\\"[BE] invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"[BE] 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\":\"0xe410e5e9618cc905cd9b9c9b32effe0fc8c79ea1e160c741b1ae957609539ff3\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.23;\\nimport \\\"@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() {\\n duration = 1 days;\\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\":\"0x13b6969e995d149240a00b1f33c54ad3323a6a7436e614fcb8d69251a58bba46\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60c0604052600a805460ff60a01b1916905534801561001d57600080fd5b5061002733610046565b600160025562015180600355610708600455466080523060a052610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60805160a05161168c6100bb6000396000610ad501526000610af6015261168c6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80637f9d3096116100b8578063b187bd261161007c578063b187bd26146102d5578063b1e5e2b7146102f9578063d869bb291461030c578063d8edeb1b14610337578063ecd8f7d01461033f578063f2fde38b1461035257600080fd5b80637f9d30961461023e57806386cd4926146102515780638da5cb5b1461027c57806397fc007c146102975780639b68ea4c146102aa57600080fd5b806344a17e061161010a57806344a17e06146101c95780634902f7e0146101dc57806356715761146102075780636457e389146102105780636d04319414610223578063715018a61461023657600080fd5b806308cdc2a8146101475780630fb5a6b41461015c57806323a5ea5e14610178578063360282751461018b5780634052a9c7146101b6575b600080fd5b61015a610155366004611332565b610365565b005b61016560035481565b6040519081526020015b60405180910390f35b610165610186366004611377565b6103c5565b6101656101993660046113d8565b600660209081526000928352604080842090915290825290205481565b61015a6101c4366004611402565b610431565b61015a6101d7366004611402565b61051b565b6101656101ea3660046113d8565b600860209081526000928352604080842090915290825290205481565b61016560045481565b61015a61021e366004611402565b6105f4565b61015a610231366004611431565b61065d565b61015a6106fa565b61015a61024c366004611402565b61070e565b61016561025f3660046113d8565b600560209081526000928352604080842090915290825290205481565b6000546040516001600160a01b03909116815260200161016f565b61015a6102a53660046114fc565b61078f565b6101656102b83660046113d8565b600760209081526000928352604080842090915290825290205481565b600a546102e990600160a01b900460ff1681565b604051901515815260200161016f565b61015a610307366004611402565b610845565b61016561031a3660046113d8565b600960209081526000928352604080842090915290825290205481565b61015a61091e565b61015a61034d366004611517565b610a14565b61015a6103603660046114fc565b610f3f565b61036d610fb8565b600a8054821515600160a01b0260ff60a01b199091161790556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217906103ba90831515815260200190565b60405180910390a150565b604080516bffffffffffffffffffffffff196060998a1b8116602080840191909152603483019990995260548201979097529490971b9094166074840152608883019190915260a882015260c8808201929092528351808203909201825260e801909252815191012090565b600a54600160a01b900460ff16156104645760405162461bcd60e51b815260040161045b906115af565b60405180910390fd5b336000818152600860209081526040808320858452909152902054156104cc5760405162461bcd60e51b815260206004820152601d60248201527f547265617375726548756e743a20616c726561647920636c61696d6564000000604482015260640161045b565b6001600160a01b03811660008181526008602090815260408083208684528252918290206001905590518481526005929160008051602061163783398151915291015b60405180910390a35050565b600a54600160a01b900460ff16156105455760405162461bcd60e51b815260040161045b906115af565b336000818152600760209081526040808320858452909152902054156105ad5760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c726561647920656e68616e6365640000604482015260640161045b565b6001600160a01b038116600081815260076020908152604080832086845282529182902060019055905184815260039291600080516020611637833981519152910161050f565b600a54600160a01b900460ff161561061e5760405162461bcd60e51b815260040161045b906115af565b3360008181526006602090815260408083208584528252918290206001905590518381526002918391600080516020611637833981519152910161050f565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c839052603c8120906106978284611012565b9050846001600160a01b0316816001600160a01b0316146106f35760405162461bcd60e51b81526020600482015260166024820152755b42455d20696e76616c6964207369676e617475726560501b604482015260640161045b565b5050505050565b610702610fb8565b61070c6000611038565b565b610716610fb8565b600454811161075c5760405162461bcd60e51b8152602060048201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b604482015260640161045b565b600381905560405181907f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac590600090a250565b610797610fb8565b6001600160a01b0381166107fb5760405162461bcd60e51b815260206004820152602560248201527f547265617375726548756e743a20616464726573732063616e206e6f74206265604482015264207a65726f60d81b606482015260840161045b565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee32790600090a250565b600a54600160a01b900460ff161561086f5760405162461bcd60e51b815260040161045b906115af565b336000818152600960209081526040808320858452909152902054156108d75760405162461bcd60e51b815260206004820152601c60248201527f547265617375726548756e743a20616c7265616479206f70656e656400000000604482015260640161045b565b6001600160a01b038116600081815260096020908152604080832086845282529182902060019055905184815260049291600080516020611637833981519152910161050f565b600a54600160a01b900460ff16156109485760405162461bcd60e51b815260040161045b906115af565b33600061095862015180426115dd565b6001600160a01b0383166000908152600560209081526040808320848452909152902054909150156109cc5760405162461bcd60e51b815260206004820181905260248201527f547265617375726548756e743a20616c726561647920636865636b656420696e604482015260640161045b565b6001600160a01b03821660008181526005602090815260408083208584528252918290206001908190559151848152919291600080516020611637833981519152910161050f565b610a1c611088565b600a54600160a01b900460ff1615610a465760405162461bcd60e51b815260040161045b906115af565b834260035482610a5691906115ff565b1015610aca5760405162461bcd60e51b815260206004820152603b60248201527f657870697265642c20706c656173652073656e6420616e6f746865722074726160448201527f6e73616374696f6e2077697468206e6577207369676e61747572650000000000606482015260840161045b565b336000610b1c828a8a7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008c8c6103c5565b600a54604080516020601f8901819004810282018101909252878152929350610b6d926001600160a01b03909216918491899089908190840183828082843760009201919091525061065d92505050565b88600103610c12576001600160a01b03821660009081526005602090815260408083208b845290915290205415610be65760405162461bcd60e51b815260206004820181905260248201527f547265617375726548756e743a20616c726561647920636865636b656420696e604482015260640161045b565b6001600160a01b03821660009081526005602090815260408083208b8452909152902060019055610ef8565b88600203610cb7576001600160a01b03821660009081526006602090815260408083208b845290915290205415610c8b5760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c7265616479206578706c6f7265640000604482015260640161045b565b6001600160a01b03821660009081526006602090815260408083208b8452909152902060019055610ef8565b88600303610d5c576001600160a01b03821660009081526007602090815260408083208b845290915290205415610d305760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c726561647920656e68616e6365640000604482015260640161045b565b6001600160a01b03821660009081526007602090815260408083208b8452909152902060019055610ef8565b88600403610e01576001600160a01b03821660009081526009602090815260408083208b845290915290205415610dd55760405162461bcd60e51b815260206004820152601c60248201527f547265617375726548756e743a20616c7265616479206f70656e656400000000604482015260640161045b565b6001600160a01b03821660009081526009602090815260408083208b8452909152902060019055610ef8565b88600503610ea6576001600160a01b03821660009081526008602090815260408083208b845290915290205415610e7a5760405162461bcd60e51b815260206004820152601d60248201527f547265617375726548756e743a20616c726561647920636c61696d6564000000604482015260640161045b565b6001600160a01b03821660009081526008602090815260408083208b8452909152902060019055610ef8565b60405162461bcd60e51b815260206004820152602160248201527f547265617375726548756e743a20696e76616c696420616374696f6e207479706044820152606560f81b606482015260840161045b565b88826001600160a01b03166000805160206116378339815191528a604051610f2291815260200190565b60405180910390a3505050610f376001600255565b505050505050565b610f47610fb8565b6001600160a01b038116610fac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045b565b610fb581611038565b50565b6000546001600160a01b0316331461070c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045b565b600080600061102185856110df565b9150915061102e81611124565b5090505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60028054036110d95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161045b565b60028055565b60008082516041036111155760208301516040840151606085015160001a6111098782858561126e565b9450945050505061111d565b506000905060025b9250929050565b600081600481111561113857611138611620565b036111405750565b600181600481111561115457611154611620565b036111a15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161045b565b60028160048111156111b5576111b5611620565b036112025760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161045b565b600381600481111561121657611216611620565b03610fb55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161045b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112a55750600090506003611329565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156112f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661132257600060019250925050611329565b9150600090505b94509492505050565b60006020828403121561134457600080fd5b8135801515811461135457600080fd5b9392505050565b80356001600160a01b038116811461137257600080fd5b919050565b600080600080600080600060e0888a03121561139257600080fd5b61139b8861135b565b965060208801359550604088013594506113b76060890161135b565b9699959850939660808101359560a0820135955060c0909101359350915050565b600080604083850312156113eb57600080fd5b6113f48361135b565b946020939093013593505050565b60006020828403121561141457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561144657600080fd5b61144f8461135b565b925060208401359150604084013567ffffffffffffffff8082111561147357600080fd5b818601915086601f83011261148757600080fd5b8135818111156114995761149961141b565b604051601f8201601f19908116603f011681019083821181831017156114c1576114c161141b565b816040528281528960208487010111156114da57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561150e57600080fd5b6113548261135b565b60008060008060008060a0878903121561153057600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff8082111561156457600080fd5b818901915089601f83011261157857600080fd5b81358181111561158757600080fd5b8a602082850101111561159957600080fd5b6020830194508093505050509295509295509295565b602080825260149082015273151c99585cdd5c99521d5b9d0e881c185d5cd95960621b604082015260600190565b6000826115fa57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561103257634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe31ee9d1c9d3111fbd70a8cefbec63f11d7ebb1783e6a7d8ca82409e345094ff5a2646970667358221220233f78717ff06e435081e5a87248d52bf154e7e09f6da767acf0a22cafd0dfa464736f6c63430008170033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80637f9d3096116100b8578063b187bd261161007c578063b187bd26146102d5578063b1e5e2b7146102f9578063d869bb291461030c578063d8edeb1b14610337578063ecd8f7d01461033f578063f2fde38b1461035257600080fd5b80637f9d30961461023e57806386cd4926146102515780638da5cb5b1461027c57806397fc007c146102975780639b68ea4c146102aa57600080fd5b806344a17e061161010a57806344a17e06146101c95780634902f7e0146101dc57806356715761146102075780636457e389146102105780636d04319414610223578063715018a61461023657600080fd5b806308cdc2a8146101475780630fb5a6b41461015c57806323a5ea5e14610178578063360282751461018b5780634052a9c7146101b6575b600080fd5b61015a610155366004611332565b610365565b005b61016560035481565b6040519081526020015b60405180910390f35b610165610186366004611377565b6103c5565b6101656101993660046113d8565b600660209081526000928352604080842090915290825290205481565b61015a6101c4366004611402565b610431565b61015a6101d7366004611402565b61051b565b6101656101ea3660046113d8565b600860209081526000928352604080842090915290825290205481565b61016560045481565b61015a61021e366004611402565b6105f4565b61015a610231366004611431565b61065d565b61015a6106fa565b61015a61024c366004611402565b61070e565b61016561025f3660046113d8565b600560209081526000928352604080842090915290825290205481565b6000546040516001600160a01b03909116815260200161016f565b61015a6102a53660046114fc565b61078f565b6101656102b83660046113d8565b600760209081526000928352604080842090915290825290205481565b600a546102e990600160a01b900460ff1681565b604051901515815260200161016f565b61015a610307366004611402565b610845565b61016561031a3660046113d8565b600960209081526000928352604080842090915290825290205481565b61015a61091e565b61015a61034d366004611517565b610a14565b61015a6103603660046114fc565b610f3f565b61036d610fb8565b600a8054821515600160a01b0260ff60a01b199091161790556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217906103ba90831515815260200190565b60405180910390a150565b604080516bffffffffffffffffffffffff196060998a1b8116602080840191909152603483019990995260548201979097529490971b9094166074840152608883019190915260a882015260c8808201929092528351808203909201825260e801909252815191012090565b600a54600160a01b900460ff16156104645760405162461bcd60e51b815260040161045b906115af565b60405180910390fd5b336000818152600860209081526040808320858452909152902054156104cc5760405162461bcd60e51b815260206004820152601d60248201527f547265617375726548756e743a20616c726561647920636c61696d6564000000604482015260640161045b565b6001600160a01b03811660008181526008602090815260408083208684528252918290206001905590518481526005929160008051602061163783398151915291015b60405180910390a35050565b600a54600160a01b900460ff16156105455760405162461bcd60e51b815260040161045b906115af565b336000818152600760209081526040808320858452909152902054156105ad5760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c726561647920656e68616e6365640000604482015260640161045b565b6001600160a01b038116600081815260076020908152604080832086845282529182902060019055905184815260039291600080516020611637833981519152910161050f565b600a54600160a01b900460ff161561061e5760405162461bcd60e51b815260040161045b906115af565b3360008181526006602090815260408083208584528252918290206001905590518381526002918391600080516020611637833981519152910161050f565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c839052603c8120906106978284611012565b9050846001600160a01b0316816001600160a01b0316146106f35760405162461bcd60e51b81526020600482015260166024820152755b42455d20696e76616c6964207369676e617475726560501b604482015260640161045b565b5050505050565b610702610fb8565b61070c6000611038565b565b610716610fb8565b600454811161075c5760405162461bcd60e51b8152602060048201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b604482015260640161045b565b600381905560405181907f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac590600090a250565b610797610fb8565b6001600160a01b0381166107fb5760405162461bcd60e51b815260206004820152602560248201527f547265617375726548756e743a20616464726573732063616e206e6f74206265604482015264207a65726f60d81b606482015260840161045b565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee32790600090a250565b600a54600160a01b900460ff161561086f5760405162461bcd60e51b815260040161045b906115af565b336000818152600960209081526040808320858452909152902054156108d75760405162461bcd60e51b815260206004820152601c60248201527f547265617375726548756e743a20616c7265616479206f70656e656400000000604482015260640161045b565b6001600160a01b038116600081815260096020908152604080832086845282529182902060019055905184815260049291600080516020611637833981519152910161050f565b600a54600160a01b900460ff16156109485760405162461bcd60e51b815260040161045b906115af565b33600061095862015180426115dd565b6001600160a01b0383166000908152600560209081526040808320848452909152902054909150156109cc5760405162461bcd60e51b815260206004820181905260248201527f547265617375726548756e743a20616c726561647920636865636b656420696e604482015260640161045b565b6001600160a01b03821660008181526005602090815260408083208584528252918290206001908190559151848152919291600080516020611637833981519152910161050f565b610a1c611088565b600a54600160a01b900460ff1615610a465760405162461bcd60e51b815260040161045b906115af565b834260035482610a5691906115ff565b1015610aca5760405162461bcd60e51b815260206004820152603b60248201527f657870697265642c20706c656173652073656e6420616e6f746865722074726160448201527f6e73616374696f6e2077697468206e6577207369676e61747572650000000000606482015260840161045b565b336000610b1c828a8a7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008c8c6103c5565b600a54604080516020601f8901819004810282018101909252878152929350610b6d926001600160a01b03909216918491899089908190840183828082843760009201919091525061065d92505050565b88600103610c12576001600160a01b03821660009081526005602090815260408083208b845290915290205415610be65760405162461bcd60e51b815260206004820181905260248201527f547265617375726548756e743a20616c726561647920636865636b656420696e604482015260640161045b565b6001600160a01b03821660009081526005602090815260408083208b8452909152902060019055610ef8565b88600203610cb7576001600160a01b03821660009081526006602090815260408083208b845290915290205415610c8b5760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c7265616479206578706c6f7265640000604482015260640161045b565b6001600160a01b03821660009081526006602090815260408083208b8452909152902060019055610ef8565b88600303610d5c576001600160a01b03821660009081526007602090815260408083208b845290915290205415610d305760405162461bcd60e51b815260206004820152601e60248201527f547265617375726548756e743a20616c726561647920656e68616e6365640000604482015260640161045b565b6001600160a01b03821660009081526007602090815260408083208b8452909152902060019055610ef8565b88600403610e01576001600160a01b03821660009081526009602090815260408083208b845290915290205415610dd55760405162461bcd60e51b815260206004820152601c60248201527f547265617375726548756e743a20616c7265616479206f70656e656400000000604482015260640161045b565b6001600160a01b03821660009081526009602090815260408083208b8452909152902060019055610ef8565b88600503610ea6576001600160a01b03821660009081526008602090815260408083208b845290915290205415610e7a5760405162461bcd60e51b815260206004820152601d60248201527f547265617375726548756e743a20616c726561647920636c61696d6564000000604482015260640161045b565b6001600160a01b03821660009081526008602090815260408083208b8452909152902060019055610ef8565b60405162461bcd60e51b815260206004820152602160248201527f547265617375726548756e743a20696e76616c696420616374696f6e207479706044820152606560f81b606482015260840161045b565b88826001600160a01b03166000805160206116378339815191528a604051610f2291815260200190565b60405180910390a3505050610f376001600255565b505050505050565b610f47610fb8565b6001600160a01b038116610fac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045b565b610fb581611038565b50565b6000546001600160a01b0316331461070c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045b565b600080600061102185856110df565b9150915061102e81611124565b5090505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60028054036110d95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161045b565b60028055565b60008082516041036111155760208301516040840151606085015160001a6111098782858561126e565b9450945050505061111d565b506000905060025b9250929050565b600081600481111561113857611138611620565b036111405750565b600181600481111561115457611154611620565b036111a15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161045b565b60028160048111156111b5576111b5611620565b036112025760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161045b565b600381600481111561121657611216611620565b03610fb55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161045b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112a55750600090506003611329565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156112f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661132257600060019250925050611329565b9150600090505b94509492505050565b60006020828403121561134457600080fd5b8135801515811461135457600080fd5b9392505050565b80356001600160a01b038116811461137257600080fd5b919050565b600080600080600080600060e0888a03121561139257600080fd5b61139b8861135b565b965060208801359550604088013594506113b76060890161135b565b9699959850939660808101359560a0820135955060c0909101359350915050565b600080604083850312156113eb57600080fd5b6113f48361135b565b946020939093013593505050565b60006020828403121561141457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561144657600080fd5b61144f8461135b565b925060208401359150604084013567ffffffffffffffff8082111561147357600080fd5b818601915086601f83011261148757600080fd5b8135818111156114995761149961141b565b604051601f8201601f19908116603f011681019083821181831017156114c1576114c161141b565b816040528281528960208487010111156114da57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561150e57600080fd5b6113548261135b565b60008060008060008060a0878903121561153057600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff8082111561156457600080fd5b818901915089601f83011261157857600080fd5b81358181111561158757600080fd5b8a602082850101111561159957600080fd5b6020830194508093505050509295509295509295565b602080825260149082015273151c99585cdd5c99521d5b9d0e881c185d5cd95960621b604082015260600190565b6000826115fa57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561103257634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfe31ee9d1c9d3111fbd70a8cefbec63f11d7ebb1783e6a7d8ca82409e345094ff5a2646970667358221220233f78717ff06e435081e5a87248d52bf154e7e09f6da767acf0a22cafd0dfa464736f6c63430008170033",
"devdoc": {
"kind": "dev",
"methods": {
"owner()": {
"details": "Returns the address of the current owner."
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
},
"updateDuation(uint256)": {
"details": "Change duration value"
},
"updateVerifier(address)": {
"details": "update verifier address"
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 7,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 2394,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "_usedSignatures",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes_memory_ptr,t_bool)"
},
{
"astId": 123,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "_status",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 2466,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "duration",
"offset": 0,
"slot": "3",
"type": "t_uint256"
},
{
"astId": 2468,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "minDuration",
"offset": 0,
"slot": "4",
"type": "t_uint256"
},
{
"astId": 1869,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "checkinHistory",
"offset": 0,
"slot": "5",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 1875,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "exploreHistory",
"offset": 0,
"slot": "6",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 1881,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "enhanceHistory",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 1887,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "claimTaskHistory",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 1893,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "openBoxHistory",
"offset": 0,
"slot": "9",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 1899,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "verifier",
"offset": 0,
"slot": "10",
"type": "t_address"
},
{
"astId": 1902,
"contract": "contracts/activity/TreasureHunt.sol:TreasureHunt",
"label": "isPaused",
"offset": 20,
"slot": "10",
"type": "t_bool"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes_memory_ptr": {
"encoding": "bytes",
"label": "bytes",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_uint256,t_uint256))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(uint256 => uint256))",
"numberOfBytes": "32",
"value": "t_mapping(t_uint256,t_uint256)"
},
"t_mapping(t_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_uint256)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}