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:76:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "60:221:76:-: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": [
|
|
18909
|
|
]
|
|
},
|
|
"id": 18910,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 18880,
|
|
"literals": [
|
|
"solidity",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "33:23:76"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "UInt",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"fullyImplemented": true,
|
|
"id": 18909,
|
|
"linearizedBaseContracts": [
|
|
18909
|
|
],
|
|
"name": "UInt",
|
|
"nameLocation": "68:4:76",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 18907,
|
|
"nodeType": "Block",
|
|
"src": "180:98:76",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
18892
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 18892,
|
|
"mutability": "mutable",
|
|
"name": "array",
|
|
"nameLocation": "204:5:76",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 18907,
|
|
"src": "187:22:76",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 18890,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "187:7:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 18891,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "187:9:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 18898,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "31",
|
|
"id": 18896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "226:1:76",
|
|
"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": 18895,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "212:13:76",
|
|
"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,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "216:7:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 18894,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "216:9:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
}
|
|
},
|
|
"id": 18897,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "212:16:76",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "187:41:76"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 18903,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 18899,
|
|
"name": "array",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 18892,
|
|
"src": "235:5:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 18901,
|
|
"indexExpression": {
|
|
"hexValue": "30",
|
|
"id": 18900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "241:1:76",
|
|
"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:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 18902,
|
|
"name": "element",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 18882,
|
|
"src": "246:7:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "235:18:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 18904,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "235:18:76"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 18905,
|
|
"name": "array",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 18892,
|
|
"src": "267:5:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 18887,
|
|
"id": 18906,
|
|
"nodeType": "Return",
|
|
"src": "260:12:76"
|
|
}
|
|
]
|
|
},
|
|
"id": 18908,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "asSingletonArray",
|
|
"nameLocation": "87:16:76",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 18883,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 18882,
|
|
"mutability": "mutable",
|
|
"name": "element",
|
|
"nameLocation": "112:7:76",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 18908,
|
|
"src": "104:15:76",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 18881,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "104:7:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "103:17:76"
|
|
},
|
|
"returnParameters": {
|
|
"id": 18887,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 18886,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 18908,
|
|
"src": "159:16:76",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 18884,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "159:7:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 18885,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "159:9:76",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "158:18:76"
|
|
},
|
|
"scope": 18909,
|
|
"src": "78:200:76",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 18910,
|
|
"src": "60:221:76",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "33:250:76"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.10+commit.fc410830.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.14",
|
|
"updatedAt": "2023-09-05T06:06:16.245Z",
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |