增加预售盒子
This commit is contained in:
parent
69681b8106
commit
1b47b22b30
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
@ -9682,10 +9682,16 @@
|
||||
"links": {},
|
||||
"address": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
|
||||
"transactionHash": "0x2204250d687161b0ca7a13205946e84000a26e776b23eb5e859e510b524829f3"
|
||||
},
|
||||
"1660789947591": {
|
||||
"events": {},
|
||||
"links": {},
|
||||
"address": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
|
||||
"transactionHash": "0x2204250d687161b0ca7a13205946e84000a26e776b23eb5e859e510b524829f3"
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T09:27:04.703Z",
|
||||
"updatedAt": "2022-08-18T03:05:16.061Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -11730,10 +11730,16 @@
|
||||
"links": {},
|
||||
"address": "0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",
|
||||
"transactionHash": "0x6d2a8e99df9adb00dfa3fda55853cddf2f206987a4c80cb8f0062fa451cb8224"
|
||||
},
|
||||
"1660789947591": {
|
||||
"events": {},
|
||||
"links": {},
|
||||
"address": "0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",
|
||||
"transactionHash": "0x6d2a8e99df9adb00dfa3fda55853cddf2f206987a4c80cb8f0062fa451cb8224"
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T09:27:05.559Z",
|
||||
"updatedAt": "2022-08-18T03:05:16.846Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
25345
build/contracts/BEPresaleBox.json
Normal file
25345
build/contracts/BEPresaleBox.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
@ -25204,10 +25204,16 @@
|
||||
"links": {},
|
||||
"address": "0xD86C8F0327494034F60e25074420BcCF560D5610",
|
||||
"transactionHash": "0x4041919e384d3cc1eafba4b30ac61ff6225c670e53d55fe5549b1c9d4b961045"
|
||||
},
|
||||
"1660789947591": {
|
||||
"events": {},
|
||||
"links": {},
|
||||
"address": "0xD86C8F0327494034F60e25074420BcCF560D5610",
|
||||
"transactionHash": "0x4041919e384d3cc1eafba4b30ac61ff6225c670e53d55fe5549b1c9d4b961045"
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T09:27:14.061Z",
|
||||
"updatedAt": "2022-08-18T03:05:25.364Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,30 +7,30 @@
|
||||
"immutableReferences": {},
|
||||
"generatedSources": [],
|
||||
"deployedGeneratedSources": [],
|
||||
"sourceMap": "57:176:14:-:0;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "57:176:14:-:0;;;;;",
|
||||
"sourceMap": "57:176:30:-:0;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "57:176:30:-:0;;;;;",
|
||||
"source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\ncontract FactoryBase {\n struct ShardParam {\n address to;\n uint256 nftId;\n address payToken;\n uint256 payAmount;\n uint256 startTime;\n uint256 saltNonce;\n }\n}\n",
|
||||
"sourcePath": "/Users/zhl/Documents/workspace/game/becrypto/contracts/logic/FactoryBase.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/logic/FactoryBase.sol",
|
||||
"exportedSymbols": {
|
||||
"FactoryBase": [
|
||||
2024
|
||||
6551
|
||||
]
|
||||
},
|
||||
"id": 2025,
|
||||
"id": 6552,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 2010,
|
||||
"id": 6537,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "32:23:14"
|
||||
"src": "32:23:30"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -39,27 +39,27 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"fullyImplemented": true,
|
||||
"id": 2024,
|
||||
"id": 6551,
|
||||
"linearizedBaseContracts": [
|
||||
2024
|
||||
6551
|
||||
],
|
||||
"name": "FactoryBase",
|
||||
"nameLocation": "66:11:14",
|
||||
"nameLocation": "66:11:30",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"canonicalName": "FactoryBase.ShardParam",
|
||||
"id": 2023,
|
||||
"id": 6550,
|
||||
"members": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2012,
|
||||
"id": 6539,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "114:2:14",
|
||||
"nameLocation": "114:2:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "106:10:14",
|
||||
"scope": 6550,
|
||||
"src": "106:10:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -67,10 +67,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2011,
|
||||
"id": 6538,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "106:7:14",
|
||||
"src": "106:7:30",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -81,13 +81,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2014,
|
||||
"id": 6541,
|
||||
"mutability": "mutable",
|
||||
"name": "nftId",
|
||||
"nameLocation": "130:5:14",
|
||||
"nameLocation": "130:5:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "122:13:14",
|
||||
"scope": 6550,
|
||||
"src": "122:13:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -95,10 +95,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2013,
|
||||
"id": 6540,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "122:7:14",
|
||||
"src": "122:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -108,13 +108,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2016,
|
||||
"id": 6543,
|
||||
"mutability": "mutable",
|
||||
"name": "payToken",
|
||||
"nameLocation": "149:8:14",
|
||||
"nameLocation": "149:8:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "141:16:14",
|
||||
"scope": 6550,
|
||||
"src": "141:16:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -122,10 +122,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2015,
|
||||
"id": 6542,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "141:7:14",
|
||||
"src": "141:7:30",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -136,13 +136,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2018,
|
||||
"id": 6545,
|
||||
"mutability": "mutable",
|
||||
"name": "payAmount",
|
||||
"nameLocation": "171:9:14",
|
||||
"nameLocation": "171:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "163:17:14",
|
||||
"scope": 6550,
|
||||
"src": "163:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -150,10 +150,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2017,
|
||||
"id": 6544,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "163:7:14",
|
||||
"src": "163:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -163,13 +163,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2020,
|
||||
"id": 6547,
|
||||
"mutability": "mutable",
|
||||
"name": "startTime",
|
||||
"nameLocation": "194:9:14",
|
||||
"nameLocation": "194:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "186:17:14",
|
||||
"scope": 6550,
|
||||
"src": "186:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -177,10 +177,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2019,
|
||||
"id": 6546,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "186:7:14",
|
||||
"src": "186:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -190,13 +190,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2022,
|
||||
"id": 6549,
|
||||
"mutability": "mutable",
|
||||
"name": "saltNonce",
|
||||
"nameLocation": "217:9:14",
|
||||
"nameLocation": "217:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "209:17:14",
|
||||
"scope": 6550,
|
||||
"src": "209:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -204,10 +204,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2021,
|
||||
"id": 6548,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "209:7:14",
|
||||
"src": "209:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -217,40 +217,40 @@
|
||||
}
|
||||
],
|
||||
"name": "ShardParam",
|
||||
"nameLocation": "89:10:14",
|
||||
"nameLocation": "89:10:30",
|
||||
"nodeType": "StructDefinition",
|
||||
"scope": 2024,
|
||||
"src": "82:149:14",
|
||||
"scope": 6551,
|
||||
"src": "82:149:30",
|
||||
"visibility": "public"
|
||||
}
|
||||
],
|
||||
"scope": 2025,
|
||||
"src": "57:176:14",
|
||||
"scope": 6552,
|
||||
"src": "57:176:30",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "32:202:14"
|
||||
"src": "32:202:30"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "project:/contracts/logic/FactoryBase.sol",
|
||||
"exportedSymbols": {
|
||||
"FactoryBase": [
|
||||
2024
|
||||
6551
|
||||
]
|
||||
},
|
||||
"id": 2025,
|
||||
"id": 6552,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 2010,
|
||||
"id": 6537,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "32:23:14"
|
||||
"src": "32:23:30"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -259,27 +259,27 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"fullyImplemented": true,
|
||||
"id": 2024,
|
||||
"id": 6551,
|
||||
"linearizedBaseContracts": [
|
||||
2024
|
||||
6551
|
||||
],
|
||||
"name": "FactoryBase",
|
||||
"nameLocation": "66:11:14",
|
||||
"nameLocation": "66:11:30",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"canonicalName": "FactoryBase.ShardParam",
|
||||
"id": 2023,
|
||||
"id": 6550,
|
||||
"members": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2012,
|
||||
"id": 6539,
|
||||
"mutability": "mutable",
|
||||
"name": "to",
|
||||
"nameLocation": "114:2:14",
|
||||
"nameLocation": "114:2:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "106:10:14",
|
||||
"scope": 6550,
|
||||
"src": "106:10:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -287,10 +287,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2011,
|
||||
"id": 6538,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "106:7:14",
|
||||
"src": "106:7:30",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -301,13 +301,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2014,
|
||||
"id": 6541,
|
||||
"mutability": "mutable",
|
||||
"name": "nftId",
|
||||
"nameLocation": "130:5:14",
|
||||
"nameLocation": "130:5:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "122:13:14",
|
||||
"scope": 6550,
|
||||
"src": "122:13:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -315,10 +315,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2013,
|
||||
"id": 6540,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "122:7:14",
|
||||
"src": "122:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -328,13 +328,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2016,
|
||||
"id": 6543,
|
||||
"mutability": "mutable",
|
||||
"name": "payToken",
|
||||
"nameLocation": "149:8:14",
|
||||
"nameLocation": "149:8:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "141:16:14",
|
||||
"scope": 6550,
|
||||
"src": "141:16:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -342,10 +342,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2015,
|
||||
"id": 6542,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "141:7:14",
|
||||
"src": "141:7:30",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
@ -356,13 +356,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2018,
|
||||
"id": 6545,
|
||||
"mutability": "mutable",
|
||||
"name": "payAmount",
|
||||
"nameLocation": "171:9:14",
|
||||
"nameLocation": "171:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "163:17:14",
|
||||
"scope": 6550,
|
||||
"src": "163:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -370,10 +370,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2017,
|
||||
"id": 6544,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "163:7:14",
|
||||
"src": "163:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -383,13 +383,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2020,
|
||||
"id": 6547,
|
||||
"mutability": "mutable",
|
||||
"name": "startTime",
|
||||
"nameLocation": "194:9:14",
|
||||
"nameLocation": "194:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "186:17:14",
|
||||
"scope": 6550,
|
||||
"src": "186:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -397,10 +397,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2019,
|
||||
"id": 6546,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "186:7:14",
|
||||
"src": "186:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -410,13 +410,13 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2022,
|
||||
"id": 6549,
|
||||
"mutability": "mutable",
|
||||
"name": "saltNonce",
|
||||
"nameLocation": "217:9:14",
|
||||
"nameLocation": "217:9:30",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2023,
|
||||
"src": "209:17:14",
|
||||
"scope": 6550,
|
||||
"src": "209:17:30",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -424,10 +424,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2021,
|
||||
"id": 6548,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "209:7:14",
|
||||
"src": "209:7:30",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -437,19 +437,19 @@
|
||||
}
|
||||
],
|
||||
"name": "ShardParam",
|
||||
"nameLocation": "89:10:14",
|
||||
"nameLocation": "89:10:30",
|
||||
"nodeType": "StructDefinition",
|
||||
"scope": 2024,
|
||||
"src": "82:149:14",
|
||||
"scope": 6551,
|
||||
"src": "82:149:30",
|
||||
"visibility": "public"
|
||||
}
|
||||
],
|
||||
"scope": 2025,
|
||||
"src": "57:176:14",
|
||||
"scope": 6552,
|
||||
"src": "57:176:30",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "32:202:14"
|
||||
"src": "32:202:30"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -457,7 +457,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T09:24:32.027Z",
|
||||
"updatedAt": "2022-10-14T05:18:29.736Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
|
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 it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -3184,10 +3184,22 @@
|
||||
"links": {},
|
||||
"address": "0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab",
|
||||
"transactionHash": "0x48bdf23a40832e27b03488c07a3499446ea72de28dfc5da232f940822771f02d"
|
||||
},
|
||||
"1660789947591": {
|
||||
"events": {},
|
||||
"links": {},
|
||||
"address": "0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab",
|
||||
"transactionHash": "0x48bdf23a40832e27b03488c07a3499446ea72de28dfc5da232f940822771f02d"
|
||||
},
|
||||
"1665724957326": {
|
||||
"events": {},
|
||||
"links": {},
|
||||
"address": "0xC89Ce4735882C9F0f0FE26686c53074E09B0D550",
|
||||
"transactionHash": "0x30f24d0449ca8b6b4cc495fd40367310d34e2eff2128343e47edffbb7f8016fc"
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T09:27:14.071Z",
|
||||
"schemaVersion": "3.4.9",
|
||||
"updatedAt": "2022-10-14T05:33:23.501Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"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 it is too large
Load Diff
@ -1,36 +1,36 @@
|
||||
{
|
||||
"contractName": "UInt",
|
||||
"abi": [],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/utils/UInt.sol\":\"UInt\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/utils/UInt.sol\":{\"keccak256\":\"0x137247f9f248803d3163e93d37120ebc2c848c45af4733b82f417a56b93d1ad2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e5e99614dd7cdcce84a664837ed5db44f81e56ddf6f288a905e56c93e7c9a2d5\",\"dweb:/ipfs/QmWhiM1isqnFyvjzSqZD6qs7gYayHEpszG8CV1CUjBdC3u\"]}},\"version\":1}",
|
||||
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba2c95fc026962092e83d6add832bf3663ad167c96158affa3769e24358a33dd64736f6c634300080a0033",
|
||||
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba2c95fc026962092e83d6add832bf3663ad167c96158affa3769e24358a33dd64736f6c634300080a0033",
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/utils/UInt.sol\":\"UInt\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/utils/UInt.sol\":{\"keccak256\":\"0xabf10d6f1fd47ffe04ab44b8b2f6638eece2276c3a8ba170d0c660e8212a7a8c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2b1d61926fb315a771d8fd0d5d9a85ea58a154cd976a7500e12a1e2b3e14083\",\"dweb:/ipfs/QmbJkytTjjABgWbYLJBHv3uoLEAcbF7pWig71sd2rjGG2M\"]}},\"version\":1}",
|
||||
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208156151ef9e5b8327b18cf43951d7332c0b736ac0952004fb55f15c80962d93864736f6c634300080a0033",
|
||||
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208156151ef9e5b8327b18cf43951d7332c0b736ac0952004fb55f15c80962d93864736f6c634300080a0033",
|
||||
"immutableReferences": {},
|
||||
"generatedSources": [],
|
||||
"deployedGeneratedSources": [],
|
||||
"sourceMap": "57:197:55:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "57:197:55:-:0;;;;;;;;",
|
||||
"source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nlibrary UInt{\n\n function asSingletonArray(uint256 element) internal pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n return array;\n }\n}\n",
|
||||
"sourceMap": "57:211:48:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "57:211:48:-:0;;;;;;;;",
|
||||
"source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nlibrary UInt {\n function asSingletonArray(uint256 element)\n internal\n pure\n returns (uint256[] memory)\n {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n return array;\n }\n}\n",
|
||||
"sourcePath": "/Users/zhl/Documents/workspace/game/becrypto/contracts/utils/UInt.sol",
|
||||
"ast": {
|
||||
"absolutePath": "project:/contracts/utils/UInt.sol",
|
||||
"exportedSymbols": {
|
||||
"UInt": [
|
||||
12021
|
||||
11488
|
||||
]
|
||||
},
|
||||
"id": 12022,
|
||||
"id": 11489,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 11992,
|
||||
"id": 11459,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "32:23:55"
|
||||
"src": "32:23:48"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -39,34 +39,34 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "library",
|
||||
"fullyImplemented": true,
|
||||
"id": 12021,
|
||||
"id": 11488,
|
||||
"linearizedBaseContracts": [
|
||||
12021
|
||||
11488
|
||||
],
|
||||
"name": "UInt",
|
||||
"nameLocation": "65:4:55",
|
||||
"nameLocation": "65:4:48",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 12019,
|
||||
"id": 11486,
|
||||
"nodeType": "Block",
|
||||
"src": "158:94:55",
|
||||
"src": "172:94:48",
|
||||
"statements": [
|
||||
{
|
||||
"assignments": [
|
||||
12004
|
||||
11471
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 12004,
|
||||
"id": 11471,
|
||||
"mutability": "mutable",
|
||||
"name": "array",
|
||||
"nameLocation": "181:5:55",
|
||||
"nameLocation": "195:5:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12019,
|
||||
"src": "164:22:55",
|
||||
"scope": 11486,
|
||||
"src": "178:22:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -75,18 +75,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 12002,
|
||||
"id": 11469,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "164:7:55",
|
||||
"src": "178:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12003,
|
||||
"id": 11470,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "164:9:55",
|
||||
"src": "178:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -95,19 +95,19 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"id": 12010,
|
||||
"id": 11477,
|
||||
"initialValue": {
|
||||
"arguments": [
|
||||
{
|
||||
"hexValue": "31",
|
||||
"id": 12008,
|
||||
"id": 11475,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "203:1:55",
|
||||
"src": "217:1:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_1_by_1",
|
||||
"typeString": "int_const 1"
|
||||
@ -122,38 +122,38 @@
|
||||
"typeString": "int_const 1"
|
||||
}
|
||||
],
|
||||
"id": 12007,
|
||||
"id": 11474,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"nodeType": "NewExpression",
|
||||
"src": "189:13:55",
|
||||
"src": "203:13:48",
|
||||
"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": 12005,
|
||||
"id": 11472,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "193:7:55",
|
||||
"src": "207:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12006,
|
||||
"id": 11473,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "193:9:55",
|
||||
"src": "207:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": 12009,
|
||||
"id": 11476,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
@ -161,7 +161,7 @@
|
||||
"lValueRequested": false,
|
||||
"names": [],
|
||||
"nodeType": "FunctionCall",
|
||||
"src": "189:16:55",
|
||||
"src": "203:16:48",
|
||||
"tryCall": false,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
@ -169,39 +169,39 @@
|
||||
}
|
||||
},
|
||||
"nodeType": "VariableDeclarationStatement",
|
||||
"src": "164:41:55"
|
||||
"src": "178:41:48"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 12015,
|
||||
"id": 11482,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"baseExpression": {
|
||||
"id": 12011,
|
||||
"id": 11478,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 12004,
|
||||
"src": "211:5:55",
|
||||
"referencedDeclaration": 11471,
|
||||
"src": "225:5:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"id": 12013,
|
||||
"id": 11480,
|
||||
"indexExpression": {
|
||||
"hexValue": "30",
|
||||
"id": 12012,
|
||||
"id": 11479,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "217:1:55",
|
||||
"src": "231:1:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_0_by_1",
|
||||
"typeString": "int_const 0"
|
||||
@ -213,7 +213,7 @@
|
||||
"isPure": false,
|
||||
"lValueRequested": true,
|
||||
"nodeType": "IndexAccess",
|
||||
"src": "211:8:55",
|
||||
"src": "225:8:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -222,67 +222,67 @@
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"id": 12014,
|
||||
"id": 11481,
|
||||
"name": "element",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 11994,
|
||||
"src": "222:7:55",
|
||||
"referencedDeclaration": 11461,
|
||||
"src": "236:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"src": "211:18:55",
|
||||
"src": "225:18:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12016,
|
||||
"id": 11483,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "211:18:55"
|
||||
"src": "225:18:48"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 12017,
|
||||
"id": 11484,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 12004,
|
||||
"src": "242:5:55",
|
||||
"referencedDeclaration": 11471,
|
||||
"src": "256:5:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 11999,
|
||||
"id": 12018,
|
||||
"functionReturnParameters": 11466,
|
||||
"id": 11485,
|
||||
"nodeType": "Return",
|
||||
"src": "235:12:55"
|
||||
"src": "249:12:48"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": 12020,
|
||||
"id": 11487,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "asSingletonArray",
|
||||
"nameLocation": "83:16:55",
|
||||
"nameLocation": "83:16:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 11995,
|
||||
"id": 11462,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 11994,
|
||||
"id": 11461,
|
||||
"mutability": "mutable",
|
||||
"name": "element",
|
||||
"nameLocation": "108:7:55",
|
||||
"nameLocation": "108:7:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12020,
|
||||
"src": "100:15:55",
|
||||
"scope": 11487,
|
||||
"src": "100:15:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -290,10 +290,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 11993,
|
||||
"id": 11460,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "100:7:55",
|
||||
"src": "100:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -302,21 +302,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "99:17:55"
|
||||
"src": "99:17:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 11999,
|
||||
"id": 11466,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 11998,
|
||||
"id": 11465,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12020,
|
||||
"src": "140:16:55",
|
||||
"scope": 11487,
|
||||
"src": "152:16:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -325,18 +325,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 11996,
|
||||
"id": 11463,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "140:7:55",
|
||||
"src": "152:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 11997,
|
||||
"id": 11464,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "140:9:55",
|
||||
"src": "152:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -345,42 +345,42 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "139:18:55"
|
||||
"src": "151:18:48"
|
||||
},
|
||||
"scope": 12021,
|
||||
"src": "74:178:55",
|
||||
"scope": 11488,
|
||||
"src": "74:192:48",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 12022,
|
||||
"src": "57:197:55",
|
||||
"scope": 11489,
|
||||
"src": "57:211:48",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "32:223:55"
|
||||
"src": "32:237:48"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "project:/contracts/utils/UInt.sol",
|
||||
"exportedSymbols": {
|
||||
"UInt": [
|
||||
12021
|
||||
11488
|
||||
]
|
||||
},
|
||||
"id": 12022,
|
||||
"id": 11489,
|
||||
"license": "MIT",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 11992,
|
||||
"id": 11459,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.8",
|
||||
".10"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "32:23:55"
|
||||
"src": "32:23:48"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
@ -389,34 +389,34 @@
|
||||
"contractDependencies": [],
|
||||
"contractKind": "library",
|
||||
"fullyImplemented": true,
|
||||
"id": 12021,
|
||||
"id": 11488,
|
||||
"linearizedBaseContracts": [
|
||||
12021
|
||||
11488
|
||||
],
|
||||
"name": "UInt",
|
||||
"nameLocation": "65:4:55",
|
||||
"nameLocation": "65:4:48",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 12019,
|
||||
"id": 11486,
|
||||
"nodeType": "Block",
|
||||
"src": "158:94:55",
|
||||
"src": "172:94:48",
|
||||
"statements": [
|
||||
{
|
||||
"assignments": [
|
||||
12004
|
||||
11471
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 12004,
|
||||
"id": 11471,
|
||||
"mutability": "mutable",
|
||||
"name": "array",
|
||||
"nameLocation": "181:5:55",
|
||||
"nameLocation": "195:5:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12019,
|
||||
"src": "164:22:55",
|
||||
"scope": 11486,
|
||||
"src": "178:22:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -425,18 +425,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 12002,
|
||||
"id": 11469,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "164:7:55",
|
||||
"src": "178:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12003,
|
||||
"id": 11470,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "164:9:55",
|
||||
"src": "178:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -445,19 +445,19 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"id": 12010,
|
||||
"id": 11477,
|
||||
"initialValue": {
|
||||
"arguments": [
|
||||
{
|
||||
"hexValue": "31",
|
||||
"id": 12008,
|
||||
"id": 11475,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "203:1:55",
|
||||
"src": "217:1:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_1_by_1",
|
||||
"typeString": "int_const 1"
|
||||
@ -472,38 +472,38 @@
|
||||
"typeString": "int_const 1"
|
||||
}
|
||||
],
|
||||
"id": 12007,
|
||||
"id": 11474,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"nodeType": "NewExpression",
|
||||
"src": "189:13:55",
|
||||
"src": "203:13:48",
|
||||
"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": 12005,
|
||||
"id": 11472,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "193:7:55",
|
||||
"src": "207:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12006,
|
||||
"id": 11473,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "193:9:55",
|
||||
"src": "207:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": 12009,
|
||||
"id": 11476,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
@ -511,7 +511,7 @@
|
||||
"lValueRequested": false,
|
||||
"names": [],
|
||||
"nodeType": "FunctionCall",
|
||||
"src": "189:16:55",
|
||||
"src": "203:16:48",
|
||||
"tryCall": false,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
@ -519,39 +519,39 @@
|
||||
}
|
||||
},
|
||||
"nodeType": "VariableDeclarationStatement",
|
||||
"src": "164:41:55"
|
||||
"src": "178:41:48"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 12015,
|
||||
"id": 11482,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"baseExpression": {
|
||||
"id": 12011,
|
||||
"id": 11478,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 12004,
|
||||
"src": "211:5:55",
|
||||
"referencedDeclaration": 11471,
|
||||
"src": "225:5:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"id": 12013,
|
||||
"id": 11480,
|
||||
"indexExpression": {
|
||||
"hexValue": "30",
|
||||
"id": 12012,
|
||||
"id": 11479,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "217:1:55",
|
||||
"src": "231:1:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_0_by_1",
|
||||
"typeString": "int_const 0"
|
||||
@ -563,7 +563,7 @@
|
||||
"isPure": false,
|
||||
"lValueRequested": true,
|
||||
"nodeType": "IndexAccess",
|
||||
"src": "211:8:55",
|
||||
"src": "225:8:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -572,67 +572,67 @@
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"id": 12014,
|
||||
"id": 11481,
|
||||
"name": "element",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 11994,
|
||||
"src": "222:7:55",
|
||||
"referencedDeclaration": 11461,
|
||||
"src": "236:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"src": "211:18:55",
|
||||
"src": "225:18:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 12016,
|
||||
"id": 11483,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "211:18:55"
|
||||
"src": "225:18:48"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"id": 12017,
|
||||
"id": 11484,
|
||||
"name": "array",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 12004,
|
||||
"src": "242:5:55",
|
||||
"referencedDeclaration": 11471,
|
||||
"src": "256:5:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
||||
"typeString": "uint256[] memory"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 11999,
|
||||
"id": 12018,
|
||||
"functionReturnParameters": 11466,
|
||||
"id": 11485,
|
||||
"nodeType": "Return",
|
||||
"src": "235:12:55"
|
||||
"src": "249:12:48"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": 12020,
|
||||
"id": 11487,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "asSingletonArray",
|
||||
"nameLocation": "83:16:55",
|
||||
"nameLocation": "83:16:48",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 11995,
|
||||
"id": 11462,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 11994,
|
||||
"id": 11461,
|
||||
"mutability": "mutable",
|
||||
"name": "element",
|
||||
"nameLocation": "108:7:55",
|
||||
"nameLocation": "108:7:48",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12020,
|
||||
"src": "100:15:55",
|
||||
"scope": 11487,
|
||||
"src": "100:15:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@ -640,10 +640,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 11993,
|
||||
"id": 11460,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "100:7:55",
|
||||
"src": "100:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@ -652,21 +652,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "99:17:55"
|
||||
"src": "99:17:48"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 11999,
|
||||
"id": 11466,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 11998,
|
||||
"id": 11465,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nameLocation": "-1:-1:-1",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 12020,
|
||||
"src": "140:16:55",
|
||||
"scope": 11487,
|
||||
"src": "152:16:48",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
@ -675,18 +675,18 @@
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 11996,
|
||||
"id": 11463,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "140:7:55",
|
||||
"src": "152:7:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"id": 11997,
|
||||
"id": 11464,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "140:9:55",
|
||||
"src": "152:9:48",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
||||
"typeString": "uint256[]"
|
||||
@ -695,21 +695,21 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "139:18:55"
|
||||
"src": "151:18:48"
|
||||
},
|
||||
"scope": 12021,
|
||||
"src": "74:178:55",
|
||||
"scope": 11488,
|
||||
"src": "74:192:48",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 12022,
|
||||
"src": "57:197:55",
|
||||
"scope": 11489,
|
||||
"src": "57:211:48",
|
||||
"usedErrors": []
|
||||
}
|
||||
],
|
||||
"src": "32:223:55"
|
||||
"src": "32:237:48"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@ -717,7 +717,7 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.4.4",
|
||||
"updatedAt": "2022-08-17T06:09:48.455Z",
|
||||
"updatedAt": "2022-10-14T05:18:29.972Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
49
contracts/tokens/erc721/BEPresaleBox.sol
Normal file
49
contracts/tokens/erc721/BEPresaleBox.sol
Normal file
@ -0,0 +1,49 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.10;
|
||||
import "./BEBase.sol";
|
||||
|
||||
contract BEPresaleBox is BEBase {
|
||||
/**
|
||||
* type of NFT the box has
|
||||
* 0: not specify
|
||||
* 1: hero
|
||||
* 2: weanpon
|
||||
* 3: chip
|
||||
*/
|
||||
mapping(uint256 => uint256) public _nftType;
|
||||
constructor() ERC721("CRYPTO ELITE'S Presale BOXES", "PBOX") {}
|
||||
|
||||
|
||||
function mintBox(address to, uint256 tokenId, uint256 nftType)
|
||||
external
|
||||
virtual
|
||||
onlyRole(MINTER_ROLE)
|
||||
{
|
||||
require(!_exists(tokenId), "Must have unique tokenId");
|
||||
// We cannot just use balanceOf to create the new tokenId because tokens
|
||||
// can be burned (destroyed), so we need a separate counter.
|
||||
_nftType[tokenId] = nftType;
|
||||
_mint(to, tokenId);
|
||||
}
|
||||
|
||||
function burn(address owner, uint256 tokenId)
|
||||
external
|
||||
virtual
|
||||
override
|
||||
onlyRole(BURN_ROLE)
|
||||
{
|
||||
require(_exists(tokenId), "TokenId not exists");
|
||||
require(!lockedTokens[tokenId], "Can not burn locked token");
|
||||
require(
|
||||
ownerOf(tokenId) == owner,
|
||||
"current address is not owner of this item now"
|
||||
);
|
||||
delete _nftType[tokenId];
|
||||
_burn(tokenId);
|
||||
}
|
||||
|
||||
function getNftType(uint256 tokenId) external view returns (uint256) {
|
||||
return _nftType[tokenId];
|
||||
}
|
||||
|
||||
}
|
12
migrations/2_depoly_presale.js
Normal file
12
migrations/2_depoly_presale.js
Normal file
@ -0,0 +1,12 @@
|
||||
const Box = artifacts.require("tokens/erc721/BEPresaleBox");
|
||||
const config = require("../config/config");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(Box);
|
||||
const boxInstance = await Box.deployed();
|
||||
if (boxInstance) {
|
||||
console.log("BEPresaleBox successfully deployed.");
|
||||
}
|
||||
await boxInstance.updateBaseURI(config.token.baseTokenURI);
|
||||
await boxInstance.setMintFactory(config.admins.admin);
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user