381 lines
15 KiB
JSON
381 lines
15 KiB
JSON
{
|
|
"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\":\"0x81f9ec754808112fb1cf07f3402579a63910fb504d82d1f54bff64e269057c46\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c8e4ea1e848ec580aeb2d1060b3e3a6d3f510f2f744d60ded632425ba5d84c7\",\"dweb:/ipfs/QmXrrZknfX1AcRtEuZBYMBU2nbU52LmvWdJYFmFdF7xbJU\"]}},\"version\":1}",
|
|
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122060fd6c9efbc1613abbe58542cb4b2c6980d88d170b917798591a194f616f904564736f6c634300080a0033",
|
|
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122060fd6c9efbc1613abbe58542cb4b2c6980d88d170b917798591a194f616f904564736f6c634300080a0033",
|
|
"immutableReferences": {},
|
|
"generatedSources": [],
|
|
"deployedGeneratedSources": [],
|
|
"sourceMap": "60:221:73:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "60:221:73:-: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",
|
|
"ast": {
|
|
"absolutePath": "project:/contracts/utils/UInt.sol",
|
|
"exportedSymbols": {
|
|
"UInt": [
|
|
17541
|
|
]
|
|
},
|
|
"id": 17542,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 17512,
|
|
"literals": [
|
|
"solidity",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "33:23:73"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "UInt",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"fullyImplemented": true,
|
|
"id": 17541,
|
|
"linearizedBaseContracts": [
|
|
17541
|
|
],
|
|
"name": "UInt",
|
|
"nameLocation": "68:4:73",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 17539,
|
|
"nodeType": "Block",
|
|
"src": "180:98:73",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
17524
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 17524,
|
|
"mutability": "mutable",
|
|
"name": "array",
|
|
"nameLocation": "204:5:73",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 17539,
|
|
"src": "187:22:73",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 17522,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "187:7:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 17523,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "187:9:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 17530,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "31",
|
|
"id": 17528,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "226:1:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
}
|
|
],
|
|
"id": 17527,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "212:13:73",
|
|
"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": 17525,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "216:7:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 17526,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "216:9:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
}
|
|
},
|
|
"id": 17529,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "212:16:73",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "187:41:73"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 17535,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 17531,
|
|
"name": "array",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17524,
|
|
"src": "235:5:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 17533,
|
|
"indexExpression": {
|
|
"hexValue": "30",
|
|
"id": 17532,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "241:1:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "235:8:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 17534,
|
|
"name": "element",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17514,
|
|
"src": "246:7:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "235:18:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 17536,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "235:18:73"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 17537,
|
|
"name": "array",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 17524,
|
|
"src": "267:5:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 17519,
|
|
"id": 17538,
|
|
"nodeType": "Return",
|
|
"src": "260:12:73"
|
|
}
|
|
]
|
|
},
|
|
"id": 17540,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "asSingletonArray",
|
|
"nameLocation": "87:16:73",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 17515,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 17514,
|
|
"mutability": "mutable",
|
|
"name": "element",
|
|
"nameLocation": "112:7:73",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 17540,
|
|
"src": "104:15:73",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 17513,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "104:7:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "103:17:73"
|
|
},
|
|
"returnParameters": {
|
|
"id": 17519,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 17518,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 17540,
|
|
"src": "159:16:73",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 17516,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "159:7:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 17517,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "159:9:73",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "158:18:73"
|
|
},
|
|
"scope": 17541,
|
|
"src": "78:200:73",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 17542,
|
|
"src": "60:221:73",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "33:250:73"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.10+commit.fc410830.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.14",
|
|
"updatedAt": "2023-07-12T06:52:15.873Z",
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |