add and deploy UAW contract (in opBNB): treasurehunt.sol
This commit is contained in:
parent
c6fb8fcbd0
commit
2e209623ad
@ -4132,7 +4132,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.155Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.205Z",
|
||||
"devdoc": {
|
||||
"details": "Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.",
|
||||
"kind": "dev",
|
||||
|
@ -1749,7 +1749,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.160Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.209Z",
|
||||
"devdoc": {
|
||||
"details": "Extension of {AccessControl} that allows enumerating the members of each role.",
|
||||
"kind": "dev",
|
||||
|
@ -4339,7 +4339,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.335Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.342Z",
|
||||
"devdoc": {
|
||||
"details": "Collection of functions related to the address type",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1582,7 +1582,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.338Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.345Z",
|
||||
"devdoc": {
|
||||
"details": "Provides a set of functions to operate with Base64 strings. _Available since v4.5._",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -255,7 +255,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.340Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.347Z",
|
||||
"devdoc": {
|
||||
"details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.",
|
||||
"kind": "dev",
|
||||
|
@ -844,7 +844,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.342Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.348Z",
|
||||
"devdoc": {
|
||||
"author": "Matt Condon (@shrugs)",
|
||||
"details": "Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number of elements in a mapping, issuing ERC721 ids, or counting request ids. Include with `using Counters for Counters.Counter;`",
|
||||
|
@ -5152,7 +5152,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.352Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.356Z",
|
||||
"devdoc": {
|
||||
"details": "Elliptic Curve Digital Signature Algorithm (ECDSA) operations. These functions can be used to verify that a message was signed by the holder of the private keys of a given address.",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -527,7 +527,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.262Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.283Z",
|
||||
"devdoc": {
|
||||
"details": "_Available since v3.1._",
|
||||
"kind": "dev",
|
||||
|
@ -320,7 +320,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.356Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.360Z",
|
||||
"devdoc": {
|
||||
"details": "Implementation of the {IERC165} interface. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check for the additional interface id that will be supported. For example: ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ``` Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -858,7 +858,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.285Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.299Z",
|
||||
"devdoc": {
|
||||
"details": "Extension of {ERC20} that allows token holders to destroy both their own tokens and those that they have an allowance for, in a way that can be recognized off-chain (via event analysis).",
|
||||
"kind": "dev",
|
||||
|
10379
build/contracts/ERC314.json
Normal file
10379
build/contracts/ERC314.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4674,7 +4674,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.322Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.331Z",
|
||||
"devdoc": {
|
||||
"details": "This implements an optional extension of {ERC721} defined in the EIP that adds enumerability of all the token ids in the contract as well as all token ids owned by each account.",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -7210,7 +7210,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.371Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.384Z",
|
||||
"devdoc": {
|
||||
"details": "Library for managing https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive types. Sets have the following properties: - Elements are added, removed, and checked for existence in constant time (O(1)). - Elements are enumerated in O(n). No guarantees are made on the ordering. ```solidity contract Example { // Add the library methods using EnumerableSet for EnumerableSet.AddressSet; // Declare a set state variable EnumerableSet.AddressSet private mySet; } ``` As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) and `uint256` (`UintSet`) are supported. [WARNING] ==== Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. ====",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1033,7 +1033,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.162Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.211Z",
|
||||
"devdoc": {
|
||||
"details": "External interface of AccessControl declared to support ERC165 detection.",
|
||||
"events": {
|
||||
|
@ -519,7 +519,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.176Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.213Z",
|
||||
"devdoc": {
|
||||
"details": "External interface of AccessControlEnumerable declared to support ERC165 detection.",
|
||||
"kind": "dev",
|
||||
|
@ -314,12 +314,12 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\r\n\r\ninterface IAsset is IERC721 {\r\n function batchMint(address to, uint256[] memory tokenIds) external;\r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\interfaces\\IAsset.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\interfaces\\IAsset.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/interfaces/IAsset.sol",
|
||||
"exportedSymbols": {
|
||||
"IAsset": [
|
||||
10479
|
||||
11011
|
||||
],
|
||||
"IERC165": [
|
||||
7175
|
||||
@ -328,29 +328,29 @@
|
||||
5614
|
||||
]
|
||||
},
|
||||
"id": 10480,
|
||||
"id": 11012,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 10467,
|
||||
"id": 10999,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "33:23:46"
|
||||
"src": "33:23:47"
|
||||
},
|
||||
{
|
||||
"absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol",
|
||||
"file": "@openzeppelin/contracts/token/ERC721/IERC721.sol",
|
||||
"id": 10468,
|
||||
"id": 11000,
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 10480,
|
||||
"scope": 11012,
|
||||
"sourceUnit": 5615,
|
||||
"src": "60:58:46",
|
||||
"src": "60:58:47",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
@ -359,53 +359,53 @@
|
||||
"baseContracts": [
|
||||
{
|
||||
"baseName": {
|
||||
"id": 10469,
|
||||
"id": 11001,
|
||||
"name": "IERC721",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 5614,
|
||||
"src": "142:7:46"
|
||||
"src": "142:7:47"
|
||||
},
|
||||
"id": 10470,
|
||||
"id": 11002,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "142:7:46"
|
||||
"src": "142:7:47"
|
||||
}
|
||||
],
|
||||
"canonicalName": "IAsset",
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"fullyImplemented": false,
|
||||
"id": 10479,
|
||||
"id": 11011,
|
||||
"linearizedBaseContracts": [
|
||||
10479,
|
||||
11011,
|
||||
5614,
|
||||
7175
|
||||
],
|
||||
"name": "IAsset",
|
||||
"nameLocation": "132:6:46",
|
||||
"nameLocation": "132:6:47",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"functionSelector": "4684d7e9",
|
||||
"id": 10478,
|
||||
"id": 11010,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "batchMint",
|
||||
"nameLocation": "164:9:46",
|
||||
"nameLocation": "164:9:47",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10476,
|
||||
"id": 11008,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10472,
|
||||
"id": 11004,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "182:2:46",
|
||||
"nameLocation": "182:2:47",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10478,
|
||||
"src": "174:10:46",
|
||||
"scope": 11010,
|
||||
"src": "174:10:47",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -413,10 +413,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10471,
|
||||
"id": 11003,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "174:7:46",
|
||||
"src": "174:7:47",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -427,13 +427,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10475,
|
||||
"id": 11007,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenIds",
|
||||
"nameLocation": "203:8:46",
|
||||
"nameLocation": "203:8:47",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10478,
|
||||
"src": "186:25:46",
|
||||
"scope": 11010,
|
||||
"src": "186:25:47",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -442,18 +442,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10473,
|
||||
"id": 11005,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "186:7:46",
|
||||
"src": "186:7:47",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10474,
|
||||
"id": 11006,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "186:9:46",
|
||||
"src": "186:9:47",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -462,27 +462,27 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "173:39:46"
|
||||
"src": "173:39:47"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10477,
|
||||
"id": 11009,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "221:0:46"
|
||||
"src": "221:0:47"
|
||||
},
|
||||
"scope": 10479,
|
||||
"src": "155:67:46",
|
||||
"scope": 11011,
|
||||
"src": "155:67:47",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 10480,
|
||||
"src": "122:103:46",
|
||||
"scope": 11012,
|
||||
"src": "122:103:47",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "33:194:46"
|
||||
"src": "33:194:47"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -490,7 +490,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:15.705Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.497Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {
|
||||
|
@ -393,12 +393,12 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\r\n\r\ninterface IBEERC1155 is IERC1155 {\r\n function mintBatch(\r\n address to,\r\n uint256[] memory ids,\r\n uint256[] memory amounts,\r\n bytes memory data\r\n ) external;\r\n\r\n function burnBatch(\r\n address owner,\r\n uint256[] memory ids,\r\n uint256[] memory values\r\n ) external;\r\n\r\n function balanceOf(address account, uint256 id)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function canMint(uint256 id) external view returns (bool);\r\n\r\n function isLocked(uint256 id) external view returns (bool);\r\n \r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\interfaces\\IBEERC1155.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\interfaces\\IBEERC1155.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/interfaces/IBEERC1155.sol",
|
||||
"exportedSymbols": {
|
||||
"IBEERC1155": [
|
||||
10532
|
||||
11064
|
||||
],
|
||||
"IERC1155": [
|
||||
3284
|
||||
@ -407,29 +407,29 @@
|
||||
7175
|
||||
]
|
||||
},
|
||||
"id": 10533,
|
||||
"id": 11065,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 10481,
|
||||
"id": 11013,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "33:23:47"
|
||||
"src": "33:23:48"
|
||||
},
|
||||
{
|
||||
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155.sol",
|
||||
"file": "@openzeppelin/contracts/token/ERC1155/IERC1155.sol",
|
||||
"id": 10482,
|
||||
"id": 11014,
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 10533,
|
||||
"scope": 11065,
|
||||
"sourceUnit": 3285,
|
||||
"src": "60:60:47",
|
||||
"src": "60:60:48",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
@ -438,53 +438,53 @@
|
||||
"baseContracts": [
|
||||
{
|
||||
"baseName": {
|
||||
"id": 10483,
|
||||
"id": 11015,
|
||||
"name": "IERC1155",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 3284,
|
||||
"src": "148:8:47"
|
||||
"src": "148:8:48"
|
||||
},
|
||||
"id": 10484,
|
||||
"id": 11016,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "148:8:47"
|
||||
"src": "148:8:48"
|
||||
}
|
||||
],
|
||||
"canonicalName": "IBEERC1155",
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"fullyImplemented": false,
|
||||
"id": 10532,
|
||||
"id": 11064,
|
||||
"linearizedBaseContracts": [
|
||||
10532,
|
||||
11064,
|
||||
3284,
|
||||
7175
|
||||
],
|
||||
"name": "IBEERC1155",
|
||||
"nameLocation": "134:10:47",
|
||||
"nameLocation": "134:10:48",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"functionSelector": "1f7fdffa",
|
||||
"id": 10497,
|
||||
"id": 11029,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "mintBatch",
|
||||
"nameLocation": "171:9:47",
|
||||
"nameLocation": "171:9:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10495,
|
||||
"id": 11027,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10486,
|
||||
"id": 11018,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "195:2:47",
|
||||
"nameLocation": "195:2:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10497,
|
||||
"src": "187:10:47",
|
||||
"scope": 11029,
|
||||
"src": "187:10:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -492,10 +492,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10485,
|
||||
"id": 11017,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "187:7:47",
|
||||
"src": "187:7:48",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -506,13 +506,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10489,
|
||||
"id": 11021,
|
||||
"mutability": "mutable",
|
||||
"name": "ids",
|
||||
"nameLocation": "221:3:47",
|
||||
"nameLocation": "221:3:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10497,
|
||||
"src": "204:20:47",
|
||||
"scope": 11029,
|
||||
"src": "204:20:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -521,18 +521,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10487,
|
||||
"id": 11019,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "204:7:47",
|
||||
"src": "204:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10488,
|
||||
"id": 11020,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "204:9:47",
|
||||
"src": "204:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -542,13 +542,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10492,
|
||||
"id": 11024,
|
||||
"mutability": "mutable",
|
||||
"name": "amounts",
|
||||
"nameLocation": "248:7:47",
|
||||
"nameLocation": "248:7:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10497,
|
||||
"src": "231:24:47",
|
||||
"scope": 11029,
|
||||
"src": "231:24:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -557,18 +557,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10490,
|
||||
"id": 11022,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "231:7:47",
|
||||
"src": "231:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10491,
|
||||
"id": 11023,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "231:9:47",
|
||||
"src": "231:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -578,13 +578,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10494,
|
||||
"id": 11026,
|
||||
"mutability": "mutable",
|
||||
"name": "data",
|
||||
"nameLocation": "275:4:47",
|
||||
"nameLocation": "275:4:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10497,
|
||||
"src": "262:17:47",
|
||||
"scope": 11029,
|
||||
"src": "262:17:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -592,10 +592,10 @@
|
||||
"typeString": "bytes"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10493,
|
||||
"id": 11025,
|
||||
"name": "bytes",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "262:5:47",
|
||||
"src": "262:5:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_storage_ptr",
|
||||
"typeString": "bytes"
|
||||
@ -604,42 +604,42 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "180:104:47"
|
||||
"src": "180:104:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10496,
|
||||
"id": 11028,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "293:0:47"
|
||||
"src": "293:0:48"
|
||||
},
|
||||
"scope": 10532,
|
||||
"src": "162:132:47",
|
||||
"scope": 11064,
|
||||
"src": "162:132:48",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "6b20c454",
|
||||
"id": 10508,
|
||||
"id": 11040,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "burnBatch",
|
||||
"nameLocation": "309:9:47",
|
||||
"nameLocation": "309:9:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10506,
|
||||
"id": 11038,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10499,
|
||||
"id": 11031,
|
||||
"mutability": "mutable",
|
||||
"name": "owner",
|
||||
"nameLocation": "333:5:47",
|
||||
"nameLocation": "333:5:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10508,
|
||||
"src": "325:13:47",
|
||||
"scope": 11040,
|
||||
"src": "325:13:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -647,10 +647,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10498,
|
||||
"id": 11030,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "325:7:47",
|
||||
"src": "325:7:48",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -661,13 +661,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10502,
|
||||
"id": 11034,
|
||||
"mutability": "mutable",
|
||||
"name": "ids",
|
||||
"nameLocation": "362:3:47",
|
||||
"nameLocation": "362:3:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10508,
|
||||
"src": "345:20:47",
|
||||
"scope": 11040,
|
||||
"src": "345:20:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -676,18 +676,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10500,
|
||||
"id": 11032,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "345:7:47",
|
||||
"src": "345:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10501,
|
||||
"id": 11033,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "345:9:47",
|
||||
"src": "345:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -697,13 +697,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10505,
|
||||
"id": 11037,
|
||||
"mutability": "mutable",
|
||||
"name": "values",
|
||||
"nameLocation": "389:6:47",
|
||||
"nameLocation": "389:6:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10508,
|
||||
"src": "372:23:47",
|
||||
"scope": 11040,
|
||||
"src": "372:23:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -712,18 +712,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10503,
|
||||
"id": 11035,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "372:7:47",
|
||||
"src": "372:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10504,
|
||||
"id": 11036,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "372:9:47",
|
||||
"src": "372:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -732,16 +732,16 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "318:82:47"
|
||||
"src": "318:82:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10507,
|
||||
"id": 11039,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "409:0:47"
|
||||
"src": "409:0:48"
|
||||
},
|
||||
"scope": 10532,
|
||||
"src": "300:110:47",
|
||||
"scope": 11064,
|
||||
"src": "300:110:48",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
@ -751,26 +751,26 @@
|
||||
3222
|
||||
],
|
||||
"functionSelector": "00fdd58e",
|
||||
"id": 10517,
|
||||
"id": 11049,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "balanceOf",
|
||||
"nameLocation": "425:9:47",
|
||||
"nameLocation": "425:9:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10513,
|
||||
"id": 11045,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10510,
|
||||
"id": 11042,
|
||||
"mutability": "mutable",
|
||||
"name": "account",
|
||||
"nameLocation": "443:7:47",
|
||||
"nameLocation": "443:7:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10517,
|
||||
"src": "435:15:47",
|
||||
"scope": 11049,
|
||||
"src": "435:15:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -778,10 +778,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10509,
|
||||
"id": 11041,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "435:7:47",
|
||||
"src": "435:7:48",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -792,13 +792,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10512,
|
||||
"id": 11044,
|
||||
"mutability": "mutable",
|
||||
"name": "id",
|
||||
"nameLocation": "460:2:47",
|
||||
"nameLocation": "460:2:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10517,
|
||||
"src": "452:10:47",
|
||||
"scope": 11049,
|
||||
"src": "452:10:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -806,10 +806,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10511,
|
||||
"id": 11043,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "452:7:47",
|
||||
"src": "452:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -818,21 +818,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "434:29:47"
|
||||
"src": "434:29:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10516,
|
||||
"id": 11048,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10515,
|
||||
"id": 11047,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10517,
|
||||
"src": "502:7:47",
|
||||
"scope": 11049,
|
||||
"src": "502:7:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -840,10 +840,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10514,
|
||||
"id": 11046,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "502:7:47",
|
||||
"src": "502:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -852,36 +852,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "501:9:47"
|
||||
"src": "501:9:48"
|
||||
},
|
||||
"scope": 10532,
|
||||
"src": "416:95:47",
|
||||
"scope": 11064,
|
||||
"src": "416:95:48",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "5dd871a3",
|
||||
"id": 10524,
|
||||
"id": 11056,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "canMint",
|
||||
"nameLocation": "526:7:47",
|
||||
"nameLocation": "526:7:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10520,
|
||||
"id": 11052,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10519,
|
||||
"id": 11051,
|
||||
"mutability": "mutable",
|
||||
"name": "id",
|
||||
"nameLocation": "542:2:47",
|
||||
"nameLocation": "542:2:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10524,
|
||||
"src": "534:10:47",
|
||||
"scope": 11056,
|
||||
"src": "534:10:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -889,10 +889,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10518,
|
||||
"id": 11050,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "534:7:47",
|
||||
"src": "534:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -901,21 +901,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "533:12:47"
|
||||
"src": "533:12:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10523,
|
||||
"id": 11055,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10522,
|
||||
"id": 11054,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10524,
|
||||
"src": "569:4:47",
|
||||
"scope": 11056,
|
||||
"src": "569:4:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -923,10 +923,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10521,
|
||||
"id": 11053,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "569:4:47",
|
||||
"src": "569:4:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@ -935,36 +935,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "568:6:47"
|
||||
"src": "568:6:48"
|
||||
},
|
||||
"scope": 10532,
|
||||
"src": "517:58:47",
|
||||
"scope": 11064,
|
||||
"src": "517:58:48",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "f6aacfb1",
|
||||
"id": 10531,
|
||||
"id": 11063,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "isLocked",
|
||||
"nameLocation": "590:8:47",
|
||||
"nameLocation": "590:8:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10527,
|
||||
"id": 11059,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10526,
|
||||
"id": 11058,
|
||||
"mutability": "mutable",
|
||||
"name": "id",
|
||||
"nameLocation": "607:2:47",
|
||||
"nameLocation": "607:2:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10531,
|
||||
"src": "599:10:47",
|
||||
"scope": 11063,
|
||||
"src": "599:10:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -972,10 +972,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10525,
|
||||
"id": 11057,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "599:7:47",
|
||||
"src": "599:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -984,21 +984,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "598:12:47"
|
||||
"src": "598:12:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10530,
|
||||
"id": 11062,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10529,
|
||||
"id": 11061,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10531,
|
||||
"src": "634:4:47",
|
||||
"scope": 11063,
|
||||
"src": "634:4:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -1006,10 +1006,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10528,
|
||||
"id": 11060,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "634:4:47",
|
||||
"src": "634:4:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@ -1018,21 +1018,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "633:6:47"
|
||||
"src": "633:6:48"
|
||||
},
|
||||
"scope": 10532,
|
||||
"src": "581:59:47",
|
||||
"scope": 11064,
|
||||
"src": "581:59:48",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 10533,
|
||||
"src": "124:523:47",
|
||||
"scope": 11065,
|
||||
"src": "124:523:48",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "33:616:47"
|
||||
"src": "33:616:48"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -1040,7 +1040,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:15.707Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.499Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {
|
||||
|
@ -375,12 +375,12 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\r\n\r\ninterface IBEERC721 is IERC721 {\r\n function mint(address to, uint256 tokenId) external;\r\n\r\n function batchMint(\r\n address to,\r\n uint256 count\r\n ) external returns (uint256[] memory);\r\n\r\n function burn(address owner, uint256 tokenId) external;\r\n\r\n function ownerOf(uint256 tokenId) external view returns (address owner);\r\n\r\n function isLocked(uint256 tokenId) external view returns (bool);\r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\interfaces\\IBEERC721.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\interfaces\\IBEERC721.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/interfaces/IBEERC721.sol",
|
||||
"exportedSymbols": {
|
||||
"IBEERC721": [
|
||||
10576
|
||||
11108
|
||||
],
|
||||
"IERC165": [
|
||||
7175
|
||||
@ -389,29 +389,29 @@
|
||||
5614
|
||||
]
|
||||
},
|
||||
"id": 10577,
|
||||
"id": 11109,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 10534,
|
||||
"id": 11066,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "33:23:48"
|
||||
"src": "33:23:49"
|
||||
},
|
||||
{
|
||||
"absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol",
|
||||
"file": "@openzeppelin/contracts/token/ERC721/IERC721.sol",
|
||||
"id": 10535,
|
||||
"id": 11067,
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 10577,
|
||||
"scope": 11109,
|
||||
"sourceUnit": 5615,
|
||||
"src": "60:58:48",
|
||||
"src": "60:58:49",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
@ -420,53 +420,53 @@
|
||||
"baseContracts": [
|
||||
{
|
||||
"baseName": {
|
||||
"id": 10536,
|
||||
"id": 11068,
|
||||
"name": "IERC721",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 5614,
|
||||
"src": "145:7:48"
|
||||
"src": "145:7:49"
|
||||
},
|
||||
"id": 10537,
|
||||
"id": 11069,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "145:7:48"
|
||||
"src": "145:7:49"
|
||||
}
|
||||
],
|
||||
"canonicalName": "IBEERC721",
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"fullyImplemented": false,
|
||||
"id": 10576,
|
||||
"id": 11108,
|
||||
"linearizedBaseContracts": [
|
||||
10576,
|
||||
11108,
|
||||
5614,
|
||||
7175
|
||||
],
|
||||
"name": "IBEERC721",
|
||||
"nameLocation": "132:9:48",
|
||||
"nameLocation": "132:9:49",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"functionSelector": "40c10f19",
|
||||
"id": 10544,
|
||||
"id": 11076,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "mint",
|
||||
"nameLocation": "167:4:48",
|
||||
"nameLocation": "167:4:49",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10542,
|
||||
"id": 11074,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10539,
|
||||
"id": 11071,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "180:2:48",
|
||||
"nameLocation": "180:2:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10544,
|
||||
"src": "172:10:48",
|
||||
"scope": 11076,
|
||||
"src": "172:10:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -474,10 +474,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10538,
|
||||
"id": 11070,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "172:7:48",
|
||||
"src": "172:7:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -488,13 +488,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10541,
|
||||
"id": 11073,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenId",
|
||||
"nameLocation": "192:7:48",
|
||||
"nameLocation": "192:7:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10544,
|
||||
"src": "184:15:48",
|
||||
"scope": 11076,
|
||||
"src": "184:15:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -502,10 +502,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10540,
|
||||
"id": 11072,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "184:7:48",
|
||||
"src": "184:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -514,42 +514,42 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "171:29:48"
|
||||
"src": "171:29:49"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10543,
|
||||
"id": 11075,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "209:0:48"
|
||||
"src": "209:0:49"
|
||||
},
|
||||
"scope": 10576,
|
||||
"src": "158:52:48",
|
||||
"scope": 11108,
|
||||
"src": "158:52:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "43508b05",
|
||||
"id": 10554,
|
||||
"id": 11086,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "batchMint",
|
||||
"nameLocation": "225:9:48",
|
||||
"nameLocation": "225:9:49",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10549,
|
||||
"id": 11081,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10546,
|
||||
"id": 11078,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "249:2:48",
|
||||
"nameLocation": "249:2:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10554,
|
||||
"src": "241:10:48",
|
||||
"scope": 11086,
|
||||
"src": "241:10:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -557,10 +557,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10545,
|
||||
"id": 11077,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "241:7:48",
|
||||
"src": "241:7:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -571,13 +571,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10548,
|
||||
"id": 11080,
|
||||
"mutability": "mutable",
|
||||
"name": "count",
|
||||
"nameLocation": "266:5:48",
|
||||
"nameLocation": "266:5:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10554,
|
||||
"src": "258:13:48",
|
||||
"scope": 11086,
|
||||
"src": "258:13:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -585,10 +585,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10547,
|
||||
"id": 11079,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "258:7:48",
|
||||
"src": "258:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -597,21 +597,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "234:42:48"
|
||||
"src": "234:42:49"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10553,
|
||||
"id": 11085,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10552,
|
||||
"id": 11084,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10554,
|
||||
"src": "295:16:48",
|
||||
"scope": 11086,
|
||||
"src": "295:16:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -620,18 +620,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 10550,
|
||||
"id": 11082,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "295:7:48",
|
||||
"src": "295:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 10551,
|
||||
"id": 11083,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "295:9:48",
|
||||
"src": "295:9:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -640,36 +640,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "294:18:48"
|
||||
"src": "294:18:49"
|
||||
},
|
||||
"scope": 10576,
|
||||
"src": "216:97:48",
|
||||
"scope": 11108,
|
||||
"src": "216:97:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "9dc29fac",
|
||||
"id": 10561,
|
||||
"id": 11093,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "burn",
|
||||
"nameLocation": "328:4:48",
|
||||
"nameLocation": "328:4:49",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10559,
|
||||
"id": 11091,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10556,
|
||||
"id": 11088,
|
||||
"mutability": "mutable",
|
||||
"name": "owner",
|
||||
"nameLocation": "341:5:48",
|
||||
"nameLocation": "341:5:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10561,
|
||||
"src": "333:13:48",
|
||||
"scope": 11093,
|
||||
"src": "333:13:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -677,10 +677,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10555,
|
||||
"id": 11087,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "333:7:48",
|
||||
"src": "333:7:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -691,13 +691,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10558,
|
||||
"id": 11090,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenId",
|
||||
"nameLocation": "356:7:48",
|
||||
"nameLocation": "356:7:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10561,
|
||||
"src": "348:15:48",
|
||||
"scope": 11093,
|
||||
"src": "348:15:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -705,10 +705,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10557,
|
||||
"id": 11089,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "348:7:48",
|
||||
"src": "348:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -717,16 +717,16 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "332:32:48"
|
||||
"src": "332:32:49"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10560,
|
||||
"id": 11092,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "373:0:48"
|
||||
"src": "373:0:49"
|
||||
},
|
||||
"scope": 10576,
|
||||
"src": "319:55:48",
|
||||
"scope": 11108,
|
||||
"src": "319:55:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
@ -736,26 +736,26 @@
|
||||
5547
|
||||
],
|
||||
"functionSelector": "6352211e",
|
||||
"id": 10568,
|
||||
"id": 11100,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "ownerOf",
|
||||
"nameLocation": "389:7:48",
|
||||
"nameLocation": "389:7:49",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10564,
|
||||
"id": 11096,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10563,
|
||||
"id": 11095,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenId",
|
||||
"nameLocation": "405:7:48",
|
||||
"nameLocation": "405:7:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10568,
|
||||
"src": "397:15:48",
|
||||
"scope": 11100,
|
||||
"src": "397:15:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -763,10 +763,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10562,
|
||||
"id": 11094,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "397:7:48",
|
||||
"src": "397:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -775,21 +775,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "396:17:48"
|
||||
"src": "396:17:49"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10567,
|
||||
"id": 11099,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10566,
|
||||
"id": 11098,
|
||||
"mutability": "mutable",
|
||||
"name": "owner",
|
||||
"nameLocation": "445:5:48",
|
||||
"nameLocation": "445:5:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10568,
|
||||
"src": "437:13:48",
|
||||
"scope": 11100,
|
||||
"src": "437:13:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -797,10 +797,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10565,
|
||||
"id": 11097,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "437:7:48",
|
||||
"src": "437:7:49",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -810,36 +810,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "436:15:48"
|
||||
"src": "436:15:49"
|
||||
},
|
||||
"scope": 10576,
|
||||
"src": "380:72:48",
|
||||
"scope": 11108,
|
||||
"src": "380:72:49",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"functionSelector": "f6aacfb1",
|
||||
"id": 10575,
|
||||
"id": 11107,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "isLocked",
|
||||
"nameLocation": "467:8:48",
|
||||
"nameLocation": "467:8:49",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10571,
|
||||
"id": 11103,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10570,
|
||||
"id": 11102,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenId",
|
||||
"nameLocation": "484:7:48",
|
||||
"nameLocation": "484:7:49",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10575,
|
||||
"src": "476:15:48",
|
||||
"scope": 11107,
|
||||
"src": "476:15:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -847,10 +847,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10569,
|
||||
"id": 11101,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "476:7:48",
|
||||
"src": "476:7:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -859,21 +859,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "475:17:48"
|
||||
"src": "475:17:49"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10574,
|
||||
"id": 11106,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10573,
|
||||
"id": 11105,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10575,
|
||||
"src": "516:4:48",
|
||||
"scope": 11107,
|
||||
"src": "516:4:49",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -881,10 +881,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10572,
|
||||
"id": 11104,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "516:4:48",
|
||||
"src": "516:4:49",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@ -893,21 +893,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "515:6:48"
|
||||
"src": "515:6:49"
|
||||
},
|
||||
"scope": 10576,
|
||||
"src": "458:64:48",
|
||||
"scope": 11108,
|
||||
"src": "458:64:49",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 10577,
|
||||
"src": "122:403:48",
|
||||
"scope": 11109,
|
||||
"src": "122:403:49",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "33:494:48"
|
||||
"src": "33:494:49"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -915,7 +915,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:15.708Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.500Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {
|
||||
|
@ -35,7 +35,7 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nimport \"../core/HasSignature712.sol\";\r\nimport \"../utils/TimeChecker.sol\";\r\n\r\ninterface IClaimBox {\r\n function batchMint(\r\n address to,\r\n uint256 count\r\n ) external returns (uint256[] memory);\r\n}\r\n\r\ncontract ClaimBoxFactory is HasSignatureEx, TimeChecker {\r\n address public executor;\r\n mapping(address => bool) public tokenSupported;\r\n mapping(address => uint256) public claimHistory;\r\n\r\n event BoxClaimed(\r\n address indexed nftAddress,\r\n address indexed to,\r\n uint256 indexed nonce,\r\n uint256 tokenId\r\n );\r\n\r\n constructor() HasSignatureEx(\"ClaimBoxFactory\", \"1\") {}\r\n\r\n function addTokenSupport(address nftToken) external onlyOwner {\r\n tokenSupported[nftToken] = true;\r\n }\r\n\r\n function removeTokenSupport(address nftToken) external onlyOwner {\r\n tokenSupported[nftToken] = false;\r\n }\r\n\r\n /**\r\n * @dev update executor\r\n */\r\n function updateExecutor(address account) external onlyOwner {\r\n require(account != address(0), \"ClaimBoxFactory: address can not be zero\");\r\n executor = account;\r\n }\r\n\r\n function claim(\r\n address nftAddress,\r\n uint256 startTime,\r\n uint256 saltNonce,\r\n bytes calldata signature\r\n ) external signatureValid(signature) timeValid(startTime) {\r\n require(tokenSupported[nftAddress], \"ClaimBoxFactory: unsupported NFT\");\r\n address to = _msgSender();\r\n require(claimHistory[to] == 0, \"ClaimBoxFactory: claimed\");\r\n bytes32 criteriaMessageHash = getMessageHash(\r\n to,\r\n nftAddress,\r\n startTime,\r\n saltNonce\r\n );\r\n checkSigner712(executor, criteriaMessageHash, signature);\r\n uint256[] memory tokenIds = IClaimBox(nftAddress).batchMint(to, 1);\r\n claimHistory[to] = tokenIds[0];\r\n _useSignature(signature);\r\n emit BoxClaimed(nftAddress, to, saltNonce, tokenIds[0]);\r\n }\r\n\r\n function getMessageHash(\r\n address _to,\r\n address _address,\r\n uint256 _startTime,\r\n uint256 _saltNonce\r\n ) public pure returns (bytes32) {\r\n bytes memory encoded = abi.encodePacked(\r\n _to,\r\n _address,\r\n _startTime,\r\n _saltNonce\r\n );\r\n return keccak256(encoded);\r\n }\r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\activity\\ClaimBoxFactory.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\activity\\ClaimBoxFactory.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/activity/ClaimBoxFactory.sol",
|
||||
"exportedSymbols": {
|
||||
@ -49,7 +49,7 @@
|
||||
7139
|
||||
],
|
||||
"HasSignatureEx": [
|
||||
10333
|
||||
10865
|
||||
],
|
||||
"IClaimBox": [
|
||||
8828
|
||||
@ -67,7 +67,7 @@
|
||||
6773
|
||||
],
|
||||
"TimeChecker": [
|
||||
18878
|
||||
20299
|
||||
]
|
||||
},
|
||||
"id": 9029,
|
||||
@ -91,7 +91,7 @@
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 9029,
|
||||
"sourceUnit": 10334,
|
||||
"sourceUnit": 10866,
|
||||
"src": "60:37:40",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
@ -103,7 +103,7 @@
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 9029,
|
||||
"sourceUnit": 18879,
|
||||
"sourceUnit": 20300,
|
||||
"src": "99:34:40",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
@ -256,7 +256,7 @@
|
||||
"id": 8829,
|
||||
"name": "HasSignatureEx",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 10333,
|
||||
"referencedDeclaration": 10865,
|
||||
"src": "294:14:40"
|
||||
},
|
||||
"id": 8830,
|
||||
@ -268,7 +268,7 @@
|
||||
"id": 8831,
|
||||
"name": "TimeChecker",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 18878,
|
||||
"referencedDeclaration": 20299,
|
||||
"src": "310:11:40"
|
||||
},
|
||||
"id": 8832,
|
||||
@ -283,8 +283,8 @@
|
||||
"id": 9028,
|
||||
"linearizedBaseContracts": [
|
||||
9028,
|
||||
18878,
|
||||
10333,
|
||||
20299,
|
||||
10865,
|
||||
651,
|
||||
6470
|
||||
],
|
||||
@ -596,7 +596,7 @@
|
||||
"id": 8854,
|
||||
"name": "HasSignatureEx",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 10333,
|
||||
"referencedDeclaration": 10865,
|
||||
"src": "610:14:40"
|
||||
},
|
||||
"nodeType": "ModifierInvocation",
|
||||
@ -1704,7 +1704,7 @@
|
||||
"name": "checkSigner712",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 10300,
|
||||
"referencedDeclaration": 10832,
|
||||
"src": "1590:14:40",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$",
|
||||
@ -2019,7 +2019,7 @@
|
||||
"name": "_useSignature",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 10332,
|
||||
"referencedDeclaration": 10864,
|
||||
"src": "1763:13:40",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_calldata_ptr_$returns$__$",
|
||||
@ -2203,7 +2203,7 @@
|
||||
"id": 8921,
|
||||
"name": "signatureValid",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 10314,
|
||||
"referencedDeclaration": 10846,
|
||||
"src": "1237:14:40"
|
||||
},
|
||||
"nodeType": "ModifierInvocation",
|
||||
@ -2230,7 +2230,7 @@
|
||||
"id": 8924,
|
||||
"name": "timeValid",
|
||||
"nodeType": "IdentifierPath",
|
||||
"referencedDeclaration": 18848,
|
||||
"referencedDeclaration": 20269,
|
||||
"src": "1263:9:40"
|
||||
},
|
||||
"nodeType": "ModifierInvocation",
|
||||
@ -2756,7 +2756,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:15.628Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.408Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
|
File diff suppressed because it is too large
Load Diff
9973
build/contracts/IEERC314.json
Normal file
9973
build/contracts/IEERC314.json
Normal file
File diff suppressed because one or more lines are too long
@ -1749,7 +1749,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.251Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.273Z",
|
||||
"devdoc": {
|
||||
"details": "Required interface of an ERC1155 compliant contract, as defined in the https://eips.ethereum.org/EIPS/eip-1155[EIP]. _Available since v3.1._",
|
||||
"events": {
|
||||
|
@ -503,7 +503,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.255Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.277Z",
|
||||
"devdoc": {
|
||||
"details": "Interface of the optional ERC1155MetadataExtension interface, as defined in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. _Available since v3.1._",
|
||||
"kind": "dev",
|
||||
|
@ -611,7 +611,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.254Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.275Z",
|
||||
"devdoc": {
|
||||
"details": "_Available since v3.1._",
|
||||
"kind": "dev",
|
||||
|
@ -177,7 +177,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.357Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.362Z",
|
||||
"devdoc": {
|
||||
"details": "Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.",
|
||||
"kind": "dev",
|
||||
|
@ -1114,7 +1114,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.283Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.297Z",
|
||||
"devdoc": {
|
||||
"details": "Interface of the ERC20 standard as defined in the EIP.",
|
||||
"events": {
|
||||
|
@ -503,7 +503,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.286Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.302Z",
|
||||
"devdoc": {
|
||||
"details": "Interface for the optional metadata functions from the ERC20 standard. _Available since v4.1._",
|
||||
"kind": "dev",
|
||||
|
@ -520,7 +520,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.288Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.303Z",
|
||||
"devdoc": {
|
||||
"details": "Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all.",
|
||||
"kind": "dev",
|
||||
|
@ -1648,7 +1648,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.317Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.327Z",
|
||||
"devdoc": {
|
||||
"details": "Required interface of an ERC721 compliant contract.",
|
||||
"events": {
|
||||
|
@ -710,7 +710,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.326Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.334Z",
|
||||
"devdoc": {
|
||||
"details": "See https://eips.ethereum.org/EIPS/eip-721",
|
||||
"kind": "dev",
|
||||
|
@ -643,7 +643,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.327Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.337Z",
|
||||
"devdoc": {
|
||||
"details": "See https://eips.ethereum.org/EIPS/eip-721",
|
||||
"kind": "dev",
|
||||
|
@ -275,7 +275,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.319Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.329Z",
|
||||
"devdoc": {
|
||||
"details": "Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.",
|
||||
"kind": "dev",
|
||||
|
@ -35,27 +35,27 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\ninterface IMetaData {\r\n function getMetaData(\r\n address token,\r\n uint256 tokenId\r\n ) external view returns (string memory);\r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\interfaces\\IMetaData.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\interfaces\\IMetaData.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/interfaces/IMetaData.sol",
|
||||
"exportedSymbols": {
|
||||
"IMetaData": [
|
||||
10588
|
||||
11120
|
||||
]
|
||||
},
|
||||
"id": 10589,
|
||||
"id": 11121,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 10578,
|
||||
"id": 11110,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "33:23:49"
|
||||
"src": "33:23:50"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -64,36 +64,36 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"fullyImplemented": false,
|
||||
"id": 10588,
|
||||
"id": 11120,
|
||||
"linearizedBaseContracts": [
|
||||
10588
|
||||
11120
|
||||
],
|
||||
"name": "IMetaData",
|
||||
"nameLocation": "70:9:49",
|
||||
"nameLocation": "70:9:50",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"functionSelector": "f666196d",
|
||||
"id": 10587,
|
||||
"id": 11119,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "getMetaData",
|
||||
"nameLocation": "94:11:49",
|
||||
"nameLocation": "94:11:50",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 10583,
|
||||
"id": 11115,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10580,
|
||||
"id": 11112,
|
||||
"mutability": "mutable",
|
||||
"name": "token",
|
||||
"nameLocation": "120:5:49",
|
||||
"nameLocation": "120:5:50",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10587,
|
||||
"src": "112:13:49",
|
||||
"scope": 11119,
|
||||
"src": "112:13:50",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -101,10 +101,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10579,
|
||||
"id": 11111,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "112:7:49",
|
||||
"src": "112:7:50",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -115,13 +115,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10582,
|
||||
"id": 11114,
|
||||
"mutability": "mutable",
|
||||
"name": "tokenId",
|
||||
"nameLocation": "140:7:49",
|
||||
"nameLocation": "140:7:50",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10587,
|
||||
"src": "132:15:49",
|
||||
"scope": 11119,
|
||||
"src": "132:15:50",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -129,10 +129,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10581,
|
||||
"id": 11113,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "132:7:49",
|
||||
"src": "132:7:50",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -141,21 +141,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "105:47:49"
|
||||
"src": "105:47:50"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 10586,
|
||||
"id": 11118,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 10585,
|
||||
"id": 11117,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 10587,
|
||||
"src": "176:13:49",
|
||||
"scope": 11119,
|
||||
"src": "176:13:50",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -163,10 +163,10 @@
|
||||
"typeString": "string"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 10584,
|
||||
"id": 11116,
|
||||
"name": "string",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "176:6:49",
|
||||
"src": "176:6:50",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_storage_ptr",
|
||||
"typeString": "string"
|
||||
@ -175,21 +175,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "175:15:49"
|
||||
"src": "175:15:50"
|
||||
},
|
||||
"scope": 10588,
|
||||
"src": "85:106:49",
|
||||
"scope": 11120,
|
||||
"src": "85:106:50",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 10589,
|
||||
"src": "60:134:49",
|
||||
"scope": 11121,
|
||||
"src": "60:134:50",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "33:163:49"
|
||||
"src": "33:163:50"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -197,7 +197,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:15.710Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.502Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2066,7 +2066,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.217Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.243Z",
|
||||
"devdoc": {
|
||||
"custom:oz-upgrades-unsafe-allow": "constructor constructor() { _disableInitializers(); } ``` ====",
|
||||
"details": "This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. The initialization functions use a version number. Once a version number is used, it is consumed and cannot be reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in case an upgrade adds a module that needs to be initialized. For example: [.hljs-theme-light.nopadding] ```solidity contract MyToken is ERC20Upgradeable { function initialize() initializer public { __ERC20_init(\"MyToken\", \"MTK\"); } } contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { function initializeV2() reinitializer(2) public { __ERC20Permit_init(\"MyToken\"); } } ``` TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: [.hljs-theme-light.nopadding] ```",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -11664,7 +11664,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.359Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.371Z",
|
||||
"devdoc": {
|
||||
"details": "Standard math utilities missing in the Solidity language.",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1372,7 +1372,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.187Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.214Z",
|
||||
"devdoc": {
|
||||
"details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.",
|
||||
"kind": "dev",
|
||||
|
@ -1195,7 +1195,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.220Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.246Z",
|
||||
"devdoc": {
|
||||
"details": "Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account. This module is used through inheritance. It will make available the modifiers `whenNotPaused` and `whenPaused`, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.",
|
||||
"events": {
|
||||
|
@ -733,7 +733,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.222Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.248Z",
|
||||
"devdoc": {
|
||||
"details": "Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].",
|
||||
"kind": "dev",
|
||||
|
@ -5103,7 +5103,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.291Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.306Z",
|
||||
"devdoc": {
|
||||
"details": "Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.",
|
||||
"kind": "dev",
|
||||
|
@ -1337,7 +1337,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.366Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.379Z",
|
||||
"devdoc": {
|
||||
"details": "Standard signed math utilities missing in the Solidity language.",
|
||||
"kind": "dev",
|
||||
|
23870
build/contracts/Simplify_314.json
Normal file
23870
build/contracts/Simplify_314.json
Normal file
File diff suppressed because one or more lines are too long
@ -3147,7 +3147,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-07-12T06:52:15.344Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.350Z",
|
||||
"devdoc": {
|
||||
"details": "String operations.",
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
21402
build/contracts/TreasureHunt.json
Normal file
21402
build/contracts/TreasureHunt.json
Normal file
File diff suppressed because one or more lines are too long
@ -7,30 +7,30 @@
|
||||
"immutableReferences": {},
|
||||
"generatedSources": [],
|
||||
"deployedGeneratedSources": [],
|
||||
"sourceMap": "60:221:76:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "60:221:76:-:0;;;;;;;;",
|
||||
"sourceMap": "60:221:78:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "60:221:78:-:0;;;;;;;;",
|
||||
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nlibrary UInt {\r\n function asSingletonArray(uint256 element)\r\n internal\r\n pure\r\n returns (uint256[] memory)\r\n {\r\n uint256[] memory array = new uint256[](1);\r\n array[0] = element;\r\n return array;\r\n }\r\n}\r\n",
|
||||
"sourcePath": "D:\\res\\CEBG\\becrypto\\contracts\\utils\\UInt.sol",
|
||||
"sourcePath": "C:\\work\\CEBG\\becrypto\\contracts\\utils\\UInt.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/utils/UInt.sol",
|
||||
"exportedSymbols": {
|
||||
"UInt": [
|
||||
18909
|
||||
20330
|
||||
]
|
||||
},
|
||||
"id": 18910,
|
||||
"id": 20331,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 18880,
|
||||
"id": 20301,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "33:23:76"
|
||||
"src": "33:23:78"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -39,34 +39,34 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "library",
|
||||
"fullyImplemented": true,
|
||||
"id": 18909,
|
||||
"id": 20330,
|
||||
"linearizedBaseContracts": [
|
||||
18909
|
||||
20330
|
||||
],
|
||||
"name": "UInt",
|
||||
"nameLocation": "68:4:76",
|
||||
"nameLocation": "68:4:78",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 18907,
|
||||
"id": 20328,
|
||||
"nodeType": "Block",
|
||||
"src": "180:98:76",
|
||||
"src": "180:98:78",
|
||||
"statements": [
|
||||
{
|
||||
"assignments": [
|
||||
18892
|
||||
20313
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 18892,
|
||||
"id": 20313,
|
||||
"mutability": "mutable",
|
||||
"name": "array",
|
||||
"nameLocation": "204:5:76",
|
||||
"nameLocation": "204:5:78",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 18907,
|
||||
"src": "187:22:76",
|
||||
"scope": 20328,
|
||||
"src": "187:22:78",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -75,18 +75,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 18890,
|
||||
"id": 20311,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "187:7:76",
|
||||
"src": "187:7:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 18891,
|
||||
"id": 20312,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "187:9:76",
|
||||
"src": "187:9:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -95,19 +95,19 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"id": 18898,
|
||||
"id": 20319,
|
||||
"initialValue": {
|
||||
"arguments": [
|
||||
{
|
||||
"hexValue": "31",
|
||||
"id": 18896,
|
||||
"id": 20317,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "226:1:76",
|
||||
"src": "226:1:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_1_by_1",
|
||||
"typeString": "int_const 1"
|
||||
@ -122,38 +122,38 @@
|
||||
"typeString": "int_const 1"
|
||||
}
|
||||
],
|
||||
"id": 18895,
|
||||
"id": 20316,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"nodeType": "NewExpression",
|
||||
"src": "212:13:76",
|
||||
"src": "212:13:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
|
||||
"typeString": "function (uint256) pure returns (uint256[] memory)"
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 18893,
|
||||
"id": 20314,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "216:7:76",
|
||||
"src": "216:7:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 18894,
|
||||
"id": 20315,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "216:9:76",
|
||||
"src": "216:9:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": 18897,
|
||||
"id": 20318,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
@ -161,7 +161,7 @@
|
||||
"lValueRequested": false,
|
||||
"names": [],
|
||||
"nodeType": "FunctionCall",
|
||||
"src": "212:16:76",
|
||||
"src": "212:16:78",
|
||||
"tryCall": false,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
@ -169,39 +169,39 @@
|
||||
}
|
||||
},
|
||||
"nodeType": "VariableDeclarationStatement",
|
||||
"src": "187:41:76"
|
||||
"src": "187:41:78"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 18903,
|
||||
"id": 20324,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"baseExpression": {
|
||||
"id": 18899,
|
||||
"id": 20320,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 18892,
|
||||
"src": "235:5:76",
|
||||
"referencedDeclaration": 20313,
|
||||
"src": "235:5:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"id": 18901,
|
||||
"id": 20322,
|
||||
"indexExpression": {
|
||||
"hexValue": "30",
|
||||
"id": 18900,
|
||||
"id": 20321,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "241:1:76",
|
||||
"src": "241:1:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_0_by_1",
|
||||
"typeString": "int_const 0"
|
||||
@ -213,7 +213,7 @@
|
||||
"isPure": false,
|
||||
"lValueRequested": true,
|
||||
"nodeType": "IndexAccess",
|
||||
"src": "235:8:76",
|
||||
"src": "235:8:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -222,67 +222,67 @@
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"id": 18902,
|
||||
"id": 20323,
|
||||
"name": "element",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 18882,
|
||||
"src": "246:7:76",
|
||||
"referencedDeclaration": 20303,
|
||||
"src": "246:7:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"src": "235:18:76",
|
||||
"src": "235:18:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 18904,
|
||||
"id": 20325,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "235:18:76"
|
||||
"src": "235:18:78"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 18905,
|
||||
"id": 20326,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 18892,
|
||||
"src": "267:5:76",
|
||||
"referencedDeclaration": 20313,
|
||||
"src": "267:5:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 18887,
|
||||
"id": 18906,
|
||||
"functionReturnParameters": 20308,
|
||||
"id": 20327,
|
||||
"nodeType": "Return",
|
||||
"src": "260:12:76"
|
||||
"src": "260:12:78"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": 18908,
|
||||
"id": 20329,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "asSingletonArray",
|
||||
"nameLocation": "87:16:76",
|
||||
"nameLocation": "87:16:78",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 18883,
|
||||
"id": 20304,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 18882,
|
||||
"id": 20303,
|
||||
"mutability": "mutable",
|
||||
"name": "element",
|
||||
"nameLocation": "112:7:76",
|
||||
"nameLocation": "112:7:78",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 18908,
|
||||
"src": "104:15:76",
|
||||
"scope": 20329,
|
||||
"src": "104:15:78",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -290,10 +290,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 18881,
|
||||
"id": 20302,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "104:7:76",
|
||||
"src": "104:7:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -302,21 +302,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "103:17:76"
|
||||
"src": "103:17:78"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 18887,
|
||||
"id": 20308,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 18886,
|
||||
"id": 20307,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 18908,
|
||||
"src": "159:16:76",
|
||||
"scope": 20329,
|
||||
"src": "159:16:78",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -325,18 +325,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 18884,
|
||||
"id": 20305,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "159:7:76",
|
||||
"src": "159:7:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 18885,
|
||||
"id": 20306,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "159:9:76",
|
||||
"src": "159:9:78",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -345,21 +345,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "158:18:76"
|
||||
"src": "158:18:78"
|
||||
},
|
||||
"scope": 18909,
|
||||
"src": "78:200:76",
|
||||
"scope": 20330,
|
||||
"src": "78:200:78",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 18910,
|
||||
"src": "60:221:76",
|
||||
"scope": 20331,
|
||||
"src": "60:221:78",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "33:250:76"
|
||||
"src": "33:250:78"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -367,7 +367,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.14",
|
||||
"updatedAt": "2023-09-05T06:06:16.245Z",
|
||||
"updatedAt": "2024-04-15T08:05:15.980Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
|
File diff suppressed because one or more lines are too long
160
contracts/activity/TreasureHunt.sol
Normal file
160
contracts/activity/TreasureHunt.sol
Normal file
@ -0,0 +1,160 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.10;
|
||||
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
|
||||
import "../core/HasSignature.sol";
|
||||
import "../utils/TimeChecker.sol";
|
||||
|
||||
|
||||
contract TreasureHunt is HasSignature, ReentrancyGuard, TimeChecker{
|
||||
mapping(address => mapping(uint256 => uint256)) public checkinHistory;
|
||||
mapping(address => mapping(uint256 => uint256)) public exploreHistory;
|
||||
mapping(address => mapping(uint256 => uint256)) public enhanceHistory;
|
||||
mapping(address => mapping(uint256 => uint256)) public claimTaskHistory;
|
||||
mapping(address => mapping(uint256 => uint256)) public openBoxHistory;
|
||||
uint256 private immutable _CACHED_CHAIN_ID;
|
||||
address private immutable _CACHED_THIS;
|
||||
address private verifier;
|
||||
|
||||
bool public isPaused = false;
|
||||
|
||||
event ActionEvent(
|
||||
address indexed user,
|
||||
uint256 indexed action,
|
||||
uint256 value
|
||||
);
|
||||
|
||||
event StateUpdated(bool isPaused);
|
||||
event VerifierUpdated(address indexed verifier);
|
||||
|
||||
constructor() {
|
||||
_CACHED_CHAIN_ID = block.chainid;
|
||||
_CACHED_THIS = address(this);
|
||||
}
|
||||
|
||||
modifier whenNotPaused() {
|
||||
require(!isPaused, "TreasureHunt: paused");
|
||||
_;
|
||||
}
|
||||
|
||||
function updatePaused(bool _isPaused) external onlyOwner {
|
||||
isPaused = _isPaused;
|
||||
emit StateUpdated(_isPaused);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev update verifier address
|
||||
*/
|
||||
function updateVerifier(address _verifier) external onlyOwner {
|
||||
require(_verifier != address(0), "TreasureHunt: address can not be zero");
|
||||
verifier = _verifier;
|
||||
emit VerifierUpdated(_verifier);
|
||||
}
|
||||
|
||||
// daily checkin
|
||||
function dailyCheckin() external whenNotPaused {
|
||||
address user = _msgSender();
|
||||
uint256 day = block.timestamp / 1 days;
|
||||
require(checkinHistory[user][day] == 0, "TreasureHunt: already checked in");
|
||||
checkinHistory[user][day] = 1;
|
||||
emit ActionEvent(user, 1, day);
|
||||
}
|
||||
|
||||
// explore
|
||||
function explore(
|
||||
uint256 step
|
||||
) external whenNotPaused {
|
||||
address user = _msgSender();
|
||||
exploreHistory[user][step] = 1;
|
||||
emit ActionEvent(user, 2, step);
|
||||
}
|
||||
|
||||
// enhance box
|
||||
function enhanceBox(
|
||||
uint256 boxId
|
||||
) external whenNotPaused {
|
||||
address user = _msgSender();
|
||||
require(enhanceHistory[user][boxId] == 0, "TreasureHunt: already enhanced");
|
||||
enhanceHistory[user][boxId] = 1;
|
||||
emit ActionEvent(user, 3, boxId);
|
||||
}
|
||||
|
||||
// open box
|
||||
function openBox(
|
||||
uint256 boxId
|
||||
) external whenNotPaused {
|
||||
address user = _msgSender();
|
||||
require(openBoxHistory[user][boxId] == 0, "TreasureHunt: already opened");
|
||||
openBoxHistory[user][boxId] = 1;
|
||||
emit ActionEvent(user, 4, boxId);
|
||||
}
|
||||
|
||||
// claim task reward
|
||||
function claimTaskReward(
|
||||
uint256 taskId
|
||||
) external whenNotPaused{
|
||||
address user = _msgSender();
|
||||
require(claimTaskHistory[user][taskId] == 0, "TreasureHunt: already claimed");
|
||||
claimTaskHistory[user][taskId] = 1;
|
||||
emit ActionEvent(user, 5, taskId);
|
||||
}
|
||||
|
||||
function generalAction(
|
||||
uint256 actionType,
|
||||
uint256 val,
|
||||
uint256 signTime,
|
||||
uint256 saltNonce,
|
||||
bytes calldata signature
|
||||
) external nonReentrant whenNotPaused timeValid(signTime){
|
||||
address user = _msgSender();
|
||||
bytes32 criteriaMessageHash = getMessageHash(
|
||||
user,
|
||||
actionType,
|
||||
val,
|
||||
_CACHED_THIS,
|
||||
_CACHED_CHAIN_ID,
|
||||
signTime,
|
||||
saltNonce
|
||||
);
|
||||
checkSigner(verifier, criteriaMessageHash, signature);
|
||||
if (actionType == 1) {
|
||||
require(checkinHistory[user][val] == 0, "TreasureHunt: already checked in");
|
||||
checkinHistory[user][val] = 1;
|
||||
} else if (actionType == 2) {
|
||||
require(exploreHistory[user][val] == 0, "TreasureHunt: already explored");
|
||||
exploreHistory[user][val] = 1;
|
||||
} else if (actionType == 3) {
|
||||
require(enhanceHistory[user][val] == 0, "TreasureHunt: already enhanced");
|
||||
enhanceHistory[user][val] = 1;
|
||||
} else if (actionType == 4) {
|
||||
require(openBoxHistory[user][val] == 0, "TreasureHunt: already opened");
|
||||
openBoxHistory[user][val] = 1;
|
||||
} else if (actionType == 5) {
|
||||
require(claimTaskHistory[user][val] == 0, "TreasureHunt: already claimed");
|
||||
claimTaskHistory[user][val] = 1;
|
||||
} else {
|
||||
revert("TreasureHunt: invalid action type");
|
||||
}
|
||||
emit ActionEvent(user, actionType, val);
|
||||
}
|
||||
|
||||
function getMessageHash(
|
||||
address _user,
|
||||
uint256 _type,
|
||||
uint256 _val,
|
||||
address _contract,
|
||||
uint256 _chainId,
|
||||
uint256 _signTime,
|
||||
uint256 _saltNonce
|
||||
) public pure returns (bytes32) {
|
||||
bytes memory encoded = abi.encodePacked(
|
||||
_user,
|
||||
_type,
|
||||
_val,
|
||||
_contract,
|
||||
_chainId,
|
||||
_signTime,
|
||||
_saltNonce
|
||||
);
|
||||
return keccak256(encoded);
|
||||
}
|
||||
}
|
349
contracts/tokens/erc314/simp.sol
Normal file
349
contracts/tokens/erc314/simp.sol
Normal file
@ -0,0 +1,349 @@
|
||||
/**
|
||||
*Submitted for verification at Etherscan.io on 2024-03-20
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//https://linktr.ee/simplifyerc
|
||||
|
||||
pragma solidity 0.8.10;
|
||||
|
||||
|
||||
/**
|
||||
* @title ERC314
|
||||
* @dev Implementation of the ERC314 interface.
|
||||
* ERC314 is a derivative of ERC20 which aims to integrate a liquidity pool on the token in order to enable native swaps, notably to reduce gas consumption.
|
||||
*/
|
||||
|
||||
// Events interface for ERC314
|
||||
interface IEERC314 {
|
||||
event Transfer(address indexed from, address indexed to, uint256 value);
|
||||
event AddLiquidity(uint32 _blockToUnlockLiquidity, uint256 value);
|
||||
event RemoveLiquidity(uint256 value);
|
||||
event Swap(
|
||||
address indexed sender,
|
||||
uint amount0In,
|
||||
uint amount1In,
|
||||
uint amount0Out,
|
||||
uint amount1Out
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
abstract contract ERC314 is IEERC314{
|
||||
mapping(address => uint256) private _balances;
|
||||
|
||||
uint256 private _totalSupply;
|
||||
uint256 public _maxWallet;
|
||||
uint32 public blockToUnlockLiquidity;
|
||||
|
||||
string private _name;
|
||||
string private _symbol;
|
||||
|
||||
address public owner;
|
||||
address public liquidityProvider;
|
||||
|
||||
bool public tradingEnable;
|
||||
bool public liquidityAdded;
|
||||
bool public maxWalletEnable;
|
||||
|
||||
uint256 presaleAmount;
|
||||
|
||||
bool public presaleEnable = false;
|
||||
|
||||
mapping(address => uint32) private lastTransaction;
|
||||
|
||||
|
||||
modifier onlyOwner() {
|
||||
require(msg.sender == owner, "Ownable: caller is not the owner");
|
||||
_;
|
||||
}
|
||||
|
||||
modifier onlyLiquidityProvider() {
|
||||
require(msg.sender == liquidityProvider, "You are not the liquidity provider");
|
||||
_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Sets the values for {name}, {symbol} and {totalSupply}.
|
||||
*
|
||||
* All two of these values are immutable: they can only be set once during
|
||||
* construction.
|
||||
*/
|
||||
constructor(string memory name_, string memory symbol_, uint256 totalSupply_) {
|
||||
_name = name_;
|
||||
_symbol = symbol_;
|
||||
_totalSupply = totalSupply_;
|
||||
_maxWallet = totalSupply_ / 200;
|
||||
owner = msg.sender;
|
||||
tradingEnable = false;
|
||||
maxWalletEnable = true;
|
||||
_balances[msg.sender] = totalSupply_/10;
|
||||
presaleAmount = (totalSupply_ - _balances[msg.sender]) / 2;
|
||||
uint256 liquidityAmount = totalSupply_ - presaleAmount - _balances[msg.sender];
|
||||
_balances[address(this)] = liquidityAmount;
|
||||
liquidityAdded = false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Sends the presale amount to the investors
|
||||
*/
|
||||
function presale(address[] memory _investors) public onlyOwner {
|
||||
require(presaleEnable == false, "Presale already enabled");
|
||||
uint256 _amount = presaleAmount / _investors.length;
|
||||
for (uint256 i = 0; i < _investors.length; i++) {
|
||||
_balances[_investors[i]] += _amount;
|
||||
}
|
||||
presaleEnable = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the name of the token.
|
||||
*/
|
||||
function name() public view virtual returns (string memory) {
|
||||
return _name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the symbol of the token, usually a shorter version of the
|
||||
* name.
|
||||
*/
|
||||
function symbol() public view virtual returns (string memory) {
|
||||
return _symbol;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @dev Returns the number of decimals used to get its user representation.
|
||||
*/
|
||||
|
||||
function decimals() public view virtual returns (uint8) {
|
||||
return 18;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev See {IERC20-totalSupply}.
|
||||
*/
|
||||
function totalSupply() public view virtual returns (uint256) {
|
||||
return _totalSupply;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev See {IERC20-balanceOf}.
|
||||
*/
|
||||
function balanceOf(address account) public view virtual returns (uint256) {
|
||||
return _balances[account];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev See {IERC20-transfer}.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - the caller must have a balance of at least `value`.
|
||||
* - if the receiver is the contract, the caller must send the amount of tokens to sell
|
||||
*/
|
||||
function transfer(address to, uint256 value) public virtual returns (bool) {
|
||||
// sell or transfer
|
||||
if (to == address(this)) {
|
||||
sell(value);
|
||||
}
|
||||
else{
|
||||
_transfer(msg.sender, to, value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively burns if `to` is the zero address.
|
||||
* All customizations to transfers and burns should be done by overriding this function.
|
||||
* This function includes MEV protection, which prevents the same address from making two transactions in the same block.(lastTransaction)
|
||||
* Emits a {Transfer} event.
|
||||
*/
|
||||
function _transfer(address from, address to, uint256 value) internal virtual {
|
||||
|
||||
require(lastTransaction[msg.sender] != block.number, "You can't make two transactions in the same block");
|
||||
|
||||
lastTransaction[msg.sender] = uint32(block.number);
|
||||
|
||||
require (_balances[from] >= value, "ERC20: transfer amount exceeds balance");
|
||||
|
||||
unchecked {
|
||||
_balances[from] = _balances[from] - value;
|
||||
}
|
||||
|
||||
if (to == address(0)) {
|
||||
unchecked {
|
||||
_totalSupply -= value;
|
||||
}
|
||||
} else {
|
||||
unchecked {
|
||||
_balances[to] += value;
|
||||
}
|
||||
}
|
||||
|
||||
emit Transfer(from, to, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the amount of ETH and tokens in the contract, used for trading.
|
||||
*/
|
||||
function getReserves() public view returns (uint256, uint256) {
|
||||
return (address(this).balance, _balances[address(this)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Enables or disables trading.
|
||||
* @param _tradingEnable: true to enable trading, false to disable trading.
|
||||
* onlyOwner modifier
|
||||
*/
|
||||
function enableTrading(bool _tradingEnable) external onlyOwner {
|
||||
tradingEnable = _tradingEnable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Enables or disables the max wallet.
|
||||
* @param _maxWalletEnable: true to enable max wallet, false to disable max wallet.
|
||||
* onlyOwner modifier
|
||||
*/
|
||||
function enableMaxWallet(bool _maxWalletEnable) external onlyOwner {
|
||||
maxWalletEnable = _maxWalletEnable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Sets the max wallet.
|
||||
* @param _maxWallet_: the new max wallet.
|
||||
* onlyOwner modifier
|
||||
*/
|
||||
function setMaxWallet(uint256 _maxWallet_) external onlyOwner {
|
||||
_maxWallet = _maxWallet_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Transfers the ownership of the contract to zero address
|
||||
* onlyOwner modifier
|
||||
*/
|
||||
function renounceOwnership() external onlyOwner {
|
||||
owner = address(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Adds liquidity to the contract.
|
||||
* @param _blockToUnlockLiquidity: the block number to unlock the liquidity.
|
||||
* value: the amount of ETH to add to the liquidity.
|
||||
* onlyOwner modifier
|
||||
*/
|
||||
function addLiquidity(uint32 _blockToUnlockLiquidity) public onlyOwner payable {
|
||||
|
||||
require(liquidityAdded == false, "Liquidity already added");
|
||||
|
||||
liquidityAdded = true;
|
||||
|
||||
require(msg.value > 0, "No ETH sent");
|
||||
require(block.number < _blockToUnlockLiquidity, "Block number too low");
|
||||
|
||||
blockToUnlockLiquidity = _blockToUnlockLiquidity;
|
||||
tradingEnable = true;
|
||||
liquidityProvider = msg.sender;
|
||||
|
||||
emit AddLiquidity(_blockToUnlockLiquidity, msg.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Removes liquidity from the contract.
|
||||
* onlyLiquidityProvider modifier
|
||||
*/
|
||||
function removeLiquidity() public onlyLiquidityProvider {
|
||||
|
||||
require(block.number > blockToUnlockLiquidity, "Liquidity locked");
|
||||
|
||||
tradingEnable = false;
|
||||
|
||||
payable(msg.sender).transfer(address(this).balance);
|
||||
|
||||
emit RemoveLiquidity(address(this).balance);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Extends the liquidity lock, only if the new block number is higher than the current one.
|
||||
* @param _blockToUnlockLiquidity: the new block number to unlock the liquidity.
|
||||
* onlyLiquidityProvider modifier
|
||||
*/
|
||||
function extendLiquidityLock(uint32 _blockToUnlockLiquidity) public onlyLiquidityProvider {
|
||||
|
||||
require(blockToUnlockLiquidity < _blockToUnlockLiquidity, "You can't shorten duration");
|
||||
|
||||
blockToUnlockLiquidity = _blockToUnlockLiquidity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Estimates the amount of tokens or ETH to receive when buying or selling.
|
||||
* @param value: the amount of ETH or tokens to swap.
|
||||
* @param _buy: true if buying, false if selling.
|
||||
*/
|
||||
function getAmountOut(uint256 value, bool _buy) public view returns(uint256) {
|
||||
|
||||
(uint256 reserveETH, uint256 reserveToken) = getReserves();
|
||||
|
||||
if (_buy) {
|
||||
return (value * reserveToken) / (reserveETH + value);
|
||||
} else {
|
||||
return (value * reserveETH) / (reserveToken + value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Buys tokens with ETH.
|
||||
* internal function
|
||||
*/
|
||||
function buy() internal {
|
||||
|
||||
require(tradingEnable, "Trading not enable");
|
||||
|
||||
uint256 token_amount = (msg.value * _balances[address(this)]) / (address(this).balance);
|
||||
|
||||
if (maxWalletEnable) {
|
||||
require(token_amount + _balances[msg.sender] <= _maxWallet, "Max wallet exceeded");
|
||||
}
|
||||
|
||||
_transfer(address(this), msg.sender, token_amount);
|
||||
|
||||
emit Swap(msg.sender, msg.value,0,0,token_amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Sells tokens for ETH.
|
||||
* internal function
|
||||
*/
|
||||
function sell(uint256 sell_amount) internal {
|
||||
|
||||
require(tradingEnable, "Trading not enable");
|
||||
|
||||
uint256 ethAmount = (sell_amount * address(this).balance) / (_balances[address(this)] + sell_amount);
|
||||
|
||||
require(ethAmount > 0, "Sell amount too low");
|
||||
require(address(this).balance >= ethAmount, "Insufficient ETH in reserves");
|
||||
|
||||
_transfer(msg.sender, address(this), sell_amount);
|
||||
payable(msg.sender).transfer(ethAmount);
|
||||
|
||||
emit Swap(msg.sender, 0,sell_amount,ethAmount,0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Fallback function to buy tokens with ETH.
|
||||
*/
|
||||
receive() external payable {
|
||||
buy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
contract Simplify_314 is ERC314 {
|
||||
uint256 private _totalSupply = 1_000_000 * 10 ** 18;
|
||||
|
||||
constructor() ERC314("Simplify 314", "SIMP", _totalSupply) {
|
||||
}
|
||||
}
|
30
migrations/19_deploy_treasurehunt.js
Normal file
30
migrations/19_deploy_treasurehunt.js
Normal file
@ -0,0 +1,30 @@
|
||||
const base = require("../scripts/base");
|
||||
const TreasureHunt = artifacts.require("activity/TreasureHunt");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
const config = require(`../config/config`);
|
||||
let cfgs = base.loadData({ network });
|
||||
|
||||
await deployer.deploy(TreasureHunt);
|
||||
const treasureInstance = await TreasureHunt.deployed();
|
||||
if (treasureInstance) {
|
||||
console.log("TreasureHunt successfully deployed.");
|
||||
console.log("address: " + treasureInstance.address);
|
||||
}
|
||||
base.updateArray({
|
||||
name: "TreasureHunt",
|
||||
type: "logic",
|
||||
json: "assets/contracts/TreasureHunt.json",
|
||||
address: treasureInstance.address,
|
||||
network,
|
||||
});
|
||||
|
||||
|
||||
|
||||
// const trueasureAddress = cfgs.find((c) => c.name === "TreasureHunt").address
|
||||
// const treasureInstance = await TreasureHunt.at(trueasureAddress);
|
||||
|
||||
|
||||
await treasureInstance.updateVerifier(config.admins.admin);
|
||||
console.log("updateSigner successfully deployed.");
|
||||
};
|
@ -30,6 +30,7 @@
|
||||
"update:stake": "npx truffle exec --network arbitrum_one ./init_scripts/update_stake.js",
|
||||
"update:candy": "npx truffle exec --network arbitrum_one ./init_scripts/generate_candy.js",
|
||||
"explorer_deploy:one": "truffle migrate --network arbitrum_one -f 18 --to 18 --compile-none",
|
||||
"action_deploy:one": "truffle migrate --network opbnb -f 19 --to 19 --compile-none",
|
||||
"size": "truffle run contract-size"
|
||||
},
|
||||
"author": "",
|
||||
|
@ -225,6 +225,26 @@ module.exports = {
|
||||
timeoutBlocks: 200,
|
||||
skipDryRun: true,
|
||||
},
|
||||
opbnb: {
|
||||
provider: () =>
|
||||
new HDWalletProvider({
|
||||
privateKeys: [arbOneKey],
|
||||
// providerOrUrl: `https://arbitrum-goerli.public.blastapi.io`,
|
||||
providerOrUrl: "https://opbnb-rpc.publicnode.com",
|
||||
pollingInterval: 8000,
|
||||
}),
|
||||
network_id: 204,
|
||||
confirmations: 6,
|
||||
timeoutBlocks: 5000,
|
||||
networkCheckTimeout: 10000000,
|
||||
deploymentPollingInterval: 8000,
|
||||
skipDryRun: true,
|
||||
production: true,
|
||||
disableConfirmationListener: true,
|
||||
from: arbOneAddr,
|
||||
gas: 30000000, // Gas sent with each transaction (default: ~6700000)
|
||||
gasPrice: 100000000, // 20 gwei (in wei) (default: 100 gwei)
|
||||
},
|
||||
lan22: {
|
||||
host: "192.168.100.22", // Localhost (default: none)
|
||||
port: 8545, // Standard Ethereum port (default: none)
|
||||
|
Loading…
x
Reference in New Issue
Block a user