3162 lines
135 KiB
JSON
3162 lines
135 KiB
JSON
{
|
|
"contractName": "Strings",
|
|
"abi": [],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"String operations.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f\",\"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]}},\"version\":1}",
|
|
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220796255509cf37ca525d2414a9cc1e27444a461f14b71441964f4db5ba23ab9ea64736f6c634300080a0033",
|
|
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220796255509cf37ca525d2414a9cc1e27444a461f14b71441964f4db5ba23ab9ea64736f6c634300080a0033",
|
|
"immutableReferences": {},
|
|
"generatedSources": [],
|
|
"deployedGeneratedSources": [],
|
|
"sourceMap": "220:2559:32:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "220:2559:32:-:0;;;;;;;;",
|
|
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n",
|
|
"sourcePath": "@openzeppelin\\contracts\\utils\\Strings.sol",
|
|
"ast": {
|
|
"absolutePath": "@openzeppelin/contracts/utils/Strings.sol",
|
|
"exportedSymbols": {
|
|
"Math": [
|
|
8041
|
|
],
|
|
"SignedMath": [
|
|
8146
|
|
],
|
|
"Strings": [
|
|
6773
|
|
]
|
|
},
|
|
"id": 6774,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 6546,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:23:32"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/math/Math.sol",
|
|
"file": "./math/Math.sol",
|
|
"id": 6547,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 6774,
|
|
"sourceUnit": 8042,
|
|
"src": "126:25:32",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/math/SignedMath.sol",
|
|
"file": "./math/SignedMath.sol",
|
|
"id": 6548,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 6774,
|
|
"sourceUnit": 8147,
|
|
"src": "152:31:32",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Strings",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 6549,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "185:34:32",
|
|
"text": " @dev String operations."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 6773,
|
|
"linearizedBaseContracts": [
|
|
6773
|
|
],
|
|
"name": "Strings",
|
|
"nameLocation": "228:7:32",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 6552,
|
|
"mutability": "constant",
|
|
"name": "_SYMBOLS",
|
|
"nameLocation": "267:8:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6773,
|
|
"src": "242:54:32",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes16",
|
|
"typeString": "bytes16"
|
|
},
|
|
"typeName": {
|
|
"id": 6550,
|
|
"name": "bytes16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "242:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes16",
|
|
"typeString": "bytes16"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "30313233343536373839616263646566",
|
|
"id": 6551,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "278:18:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f",
|
|
"typeString": "literal_string \"0123456789abcdef\""
|
|
},
|
|
"value": "0123456789abcdef"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 6555,
|
|
"mutability": "constant",
|
|
"name": "_ADDRESS_LENGTH",
|
|
"nameLocation": "325:15:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6773,
|
|
"src": "302:43:32",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 6553,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "302:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "3230",
|
|
"id": 6554,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "343:2:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_20_by_1",
|
|
"typeString": "int_const 20"
|
|
},
|
|
"value": "20"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6602,
|
|
"nodeType": "Block",
|
|
"src": "518:625:32",
|
|
"statements": [
|
|
{
|
|
"id": 6601,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "528:609:32",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
6564
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 6564,
|
|
"mutability": "mutable",
|
|
"name": "length",
|
|
"nameLocation": "560:6:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6601,
|
|
"src": "552:14:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6563,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "552:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 6571,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6570,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 6567,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6558,
|
|
"src": "580:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 6565,
|
|
"name": "Math",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8041,
|
|
"src": "569:4:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Math_$8041_$",
|
|
"typeString": "type(library Math)"
|
|
}
|
|
},
|
|
"id": 6566,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "log10",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 7878,
|
|
"src": "569:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 6568,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "569:17:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 6569,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "589:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "569:21:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "552:38:32"
|
|
},
|
|
{
|
|
"assignments": [
|
|
6573
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 6573,
|
|
"mutability": "mutable",
|
|
"name": "buffer",
|
|
"nameLocation": "618:6:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6601,
|
|
"src": "604:20:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6572,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "604:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 6578,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 6576,
|
|
"name": "length",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6564,
|
|
"src": "638:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 6575,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "627:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (string memory)"
|
|
},
|
|
"typeName": {
|
|
"id": 6574,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "631:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
}
|
|
},
|
|
"id": 6577,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "627:18:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "604:41:32"
|
|
},
|
|
{
|
|
"assignments": [
|
|
6580
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 6580,
|
|
"mutability": "mutable",
|
|
"name": "ptr",
|
|
"nameLocation": "667:3:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6601,
|
|
"src": "659:11:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6579,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "659:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 6581,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "659:11:32"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "740:67:32",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "758:35:32",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "buffer",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "769:6:32"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "781:2:32",
|
|
"type": "",
|
|
"value": "32"
|
|
},
|
|
{
|
|
"name": "length",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "785:6:32"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "777:3:32"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "777:15:32"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "765:3:32"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "765:28:32"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "ptr",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "758:3:32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@solidity memory-safe-assembly",
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 6573,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "769:6:32",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 6564,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "785:6:32",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 6580,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "758:3:32",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 6582,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "731:76:32"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6597,
|
|
"nodeType": "Block",
|
|
"src": "833:267:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 6585,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "--",
|
|
"prefix": false,
|
|
"src": "851:5:32",
|
|
"subExpression": {
|
|
"id": 6584,
|
|
"name": "ptr",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6580,
|
|
"src": "851:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 6586,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "851:5:32"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "934:84:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"name": "ptr",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "964:3:32"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "value",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "978:5:32"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "985:2:32",
|
|
"type": "",
|
|
"value": "10"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mod",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "974:3:32"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "974:14:32"
|
|
},
|
|
{
|
|
"name": "_SYMBOLS",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "990:8:32"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "byte",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "969:4:32"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "969:30:32"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore8",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "956:7:32"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "956:44:32"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "956:44:32"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@solidity memory-safe-assembly",
|
|
"evmVersion": "london",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 6552,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "990:8:32",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 6580,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "964:3:32",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 6558,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "978:5:32",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 6587,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "925:93:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 6590,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 6588,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6558,
|
|
"src": "1035:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "/=",
|
|
"rightHandSide": {
|
|
"hexValue": "3130",
|
|
"id": 6589,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1044:2:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"src": "1035:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 6591,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1035:11:32"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6594,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 6592,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6558,
|
|
"src": "1068:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 6593,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1077:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1068:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 6596,
|
|
"nodeType": "IfStatement",
|
|
"src": "1064:21:32",
|
|
"trueBody": {
|
|
"id": 6595,
|
|
"nodeType": "Break",
|
|
"src": "1080:5:32"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"hexValue": "74727565",
|
|
"id": 6583,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "827:4:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"id": 6598,
|
|
"nodeType": "WhileStatement",
|
|
"src": "820:280:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 6599,
|
|
"name": "buffer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6573,
|
|
"src": "1120:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6562,
|
|
"id": 6600,
|
|
"nodeType": "Return",
|
|
"src": "1113:13:32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6556,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "352:90:32",
|
|
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation."
|
|
},
|
|
"id": 6603,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toString",
|
|
"nameLocation": "456:8:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6559,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6558,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "473:5:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6603,
|
|
"src": "465:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6557,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "465:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "464:15:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6562,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6561,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6603,
|
|
"src": "503:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6560,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "503:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "502:15:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "447:696:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6630,
|
|
"nodeType": "Block",
|
|
"src": "1313:103:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 6617,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 6615,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6606,
|
|
"src": "1354:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 6616,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1362:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1354:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"hexValue": "",
|
|
"id": 6619,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1372:2:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
},
|
|
"id": 6620,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "1354:20:32",
|
|
"trueExpression": {
|
|
"hexValue": "2d",
|
|
"id": 6618,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1366:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561",
|
|
"typeString": "literal_string \"-\""
|
|
},
|
|
"value": "-"
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 6624,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6606,
|
|
"src": "1400:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 6622,
|
|
"name": "SignedMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8146,
|
|
"src": "1385:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_SignedMath_$8146_$",
|
|
"typeString": "type(library SignedMath)"
|
|
}
|
|
},
|
|
"id": 6623,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "abs",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 8145,
|
|
"src": "1385:14:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$",
|
|
"typeString": "function (int256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 6625,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1385:21:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 6621,
|
|
"name": "toString",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
6603,
|
|
6631
|
|
],
|
|
"referencedDeclaration": 6603,
|
|
"src": "1376:8:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (string memory)"
|
|
}
|
|
},
|
|
"id": 6626,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1376:31:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 6613,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "1337:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 6614,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodePacked",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1337:16:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function () pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 6627,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1337:71:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 6612,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1330:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
|
|
"typeString": "type(string storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 6611,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1330:6:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1330:79:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6610,
|
|
"id": 6629,
|
|
"nodeType": "Return",
|
|
"src": "1323:86:32"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6604,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1149:89:32",
|
|
"text": " @dev Converts a `int256` to its ASCII `string` decimal representation."
|
|
},
|
|
"id": 6631,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toString",
|
|
"nameLocation": "1252:8:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6607,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6606,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1268:5:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6631,
|
|
"src": "1261:12:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 6605,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1261:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1260:14:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6610,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6609,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6631,
|
|
"src": "1298:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6608,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1298:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1297:15:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "1243:173:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6650,
|
|
"nodeType": "Block",
|
|
"src": "1595:100:32",
|
|
"statements": [
|
|
{
|
|
"id": 6649,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1605:84:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 6640,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6634,
|
|
"src": "1648:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6646,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 6643,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6634,
|
|
"src": "1667:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 6641,
|
|
"name": "Math",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8041,
|
|
"src": "1655:4:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Math_$8041_$",
|
|
"typeString": "type(library Math)"
|
|
}
|
|
},
|
|
"id": 6642,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "log256",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 8001,
|
|
"src": "1655:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 6644,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1655:18:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 6645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1676:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "1655:22:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 6639,
|
|
"name": "toHexString",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
6651,
|
|
6727,
|
|
6747
|
|
],
|
|
"referencedDeclaration": 6727,
|
|
"src": "1636:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
|
|
"typeString": "function (uint256,uint256) pure returns (string memory)"
|
|
}
|
|
},
|
|
"id": 6647,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1636:42:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6638,
|
|
"id": 6648,
|
|
"nodeType": "Return",
|
|
"src": "1629:49:32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6632,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1422:94:32",
|
|
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation."
|
|
},
|
|
"id": 6651,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toHexString",
|
|
"nameLocation": "1530:11:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6635,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6634,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1550:5:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6651,
|
|
"src": "1542:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6633,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1542:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1541:15:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6638,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6637,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6651,
|
|
"src": "1580:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6636,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1580:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1579:15:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "1521:174:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6726,
|
|
"nodeType": "Block",
|
|
"src": "1908:347:32",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
6662
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 6662,
|
|
"mutability": "mutable",
|
|
"name": "buffer",
|
|
"nameLocation": "1931:6:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6726,
|
|
"src": "1918:19:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 6661,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1918:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 6671,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6669,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6667,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 6665,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1950:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 6666,
|
|
"name": "length",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6656,
|
|
"src": "1954:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1950:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "32",
|
|
"id": 6668,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1963:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"src": "1950:14:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 6664,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "1940:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (bytes memory)"
|
|
},
|
|
"typeName": {
|
|
"id": 6663,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1944:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
}
|
|
},
|
|
"id": 6670,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1940:25:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1918:47:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 6676,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 6672,
|
|
"name": "buffer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6662,
|
|
"src": "1975:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 6674,
|
|
"indexExpression": {
|
|
"hexValue": "30",
|
|
"id": 6673,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1982:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1975:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"hexValue": "30",
|
|
"id": 6675,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1987:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
|
|
"typeString": "literal_string \"0\""
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1975:15:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"id": 6677,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1975:15:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 6682,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 6678,
|
|
"name": "buffer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6662,
|
|
"src": "2000:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 6680,
|
|
"indexExpression": {
|
|
"hexValue": "31",
|
|
"id": 6679,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2007:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2000:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"hexValue": "78",
|
|
"id": 6681,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2012:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83",
|
|
"typeString": "literal_string \"x\""
|
|
},
|
|
"value": "x"
|
|
},
|
|
"src": "2000:15:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"id": 6683,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2000:15:32"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6712,
|
|
"nodeType": "Block",
|
|
"src": "2070:83:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 6706,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 6698,
|
|
"name": "buffer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6662,
|
|
"src": "2084:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 6700,
|
|
"indexExpression": {
|
|
"id": 6699,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6685,
|
|
"src": "2091:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2084:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"baseExpression": {
|
|
"id": 6701,
|
|
"name": "_SYMBOLS",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6552,
|
|
"src": "2096:8:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes16",
|
|
"typeString": "bytes16"
|
|
}
|
|
},
|
|
"id": 6705,
|
|
"indexExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6704,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 6702,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6654,
|
|
"src": "2105:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&",
|
|
"rightExpression": {
|
|
"hexValue": "307866",
|
|
"id": 6703,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2113:3:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_15_by_1",
|
|
"typeString": "int_const 15"
|
|
},
|
|
"value": "0xf"
|
|
},
|
|
"src": "2105:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2096:21:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"src": "2084:33:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes1",
|
|
"typeString": "bytes1"
|
|
}
|
|
},
|
|
"id": 6707,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2084:33:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 6710,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 6708,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6654,
|
|
"src": "2131:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": ">>=",
|
|
"rightHandSide": {
|
|
"hexValue": "34",
|
|
"id": 6709,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2141:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"src": "2131:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 6711,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2131:11:32"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6694,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 6692,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6685,
|
|
"src": "2058:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 6693,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2062:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "2058:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 6713,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
6685
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 6685,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "2038:1:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6713,
|
|
"src": "2030:9:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6684,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2030:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 6691,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6690,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6688,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "32",
|
|
"id": 6686,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2042:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 6687,
|
|
"name": "length",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6656,
|
|
"src": "2046:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2042:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 6689,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2055:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "2042:14:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2030:26:32"
|
|
},
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 6696,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "--",
|
|
"prefix": true,
|
|
"src": "2065:3:32",
|
|
"subExpression": {
|
|
"id": 6695,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6685,
|
|
"src": "2067:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 6697,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2065:3:32"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "2025:128:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 6717,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 6715,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6654,
|
|
"src": "2170:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 6716,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2179:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2170:10:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74",
|
|
"id": 6718,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2182:34:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2",
|
|
"typeString": "literal_string \"Strings: hex length insufficient\""
|
|
},
|
|
"value": "Strings: hex length insufficient"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2",
|
|
"typeString": "literal_string \"Strings: hex length insufficient\""
|
|
}
|
|
],
|
|
"id": 6714,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2162:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 6719,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2162:55:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 6720,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2162:55:32"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 6723,
|
|
"name": "buffer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6662,
|
|
"src": "2241:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 6722,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2234:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
|
|
"typeString": "type(string storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 6721,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2234:6:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6724,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2234:14:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6660,
|
|
"id": 6725,
|
|
"nodeType": "Return",
|
|
"src": "2227:21:32"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6652,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1701:112:32",
|
|
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length."
|
|
},
|
|
"id": 6727,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toHexString",
|
|
"nameLocation": "1827:11:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6657,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6654,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1847:5:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6727,
|
|
"src": "1839:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6653,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1839:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 6656,
|
|
"mutability": "mutable",
|
|
"name": "length",
|
|
"nameLocation": "1862:6:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6727,
|
|
"src": "1854:14:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 6655,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1854:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1838:31:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6660,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6659,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6727,
|
|
"src": "1893:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6658,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1893:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1892:15:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "1818:437:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6746,
|
|
"nodeType": "Block",
|
|
"src": "2480:76:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 6740,
|
|
"name": "addr",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6730,
|
|
"src": "2525:4:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 6739,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2517:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint160_$",
|
|
"typeString": "type(uint160)"
|
|
},
|
|
"typeName": {
|
|
"id": 6738,
|
|
"name": "uint160",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2517:7:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2517:13:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint160",
|
|
"typeString": "uint160"
|
|
}
|
|
],
|
|
"id": 6737,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2509:7:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 6736,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2509:7:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2509:22:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 6743,
|
|
"name": "_ADDRESS_LENGTH",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6555,
|
|
"src": "2533:15:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
],
|
|
"id": 6735,
|
|
"name": "toHexString",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
6651,
|
|
6727,
|
|
6747
|
|
],
|
|
"referencedDeclaration": 6727,
|
|
"src": "2497:11:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
|
|
"typeString": "function (uint256,uint256) pure returns (string memory)"
|
|
}
|
|
},
|
|
"id": 6744,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2497:52:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6734,
|
|
"id": 6745,
|
|
"nodeType": "Return",
|
|
"src": "2490:59:32"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6728,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2261:141:32",
|
|
"text": " @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation."
|
|
},
|
|
"id": 6747,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toHexString",
|
|
"nameLocation": "2416:11:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6731,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6730,
|
|
"mutability": "mutable",
|
|
"name": "addr",
|
|
"nameLocation": "2436:4:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6747,
|
|
"src": "2428:12:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 6729,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2428:7:32",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2427:14:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6734,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6733,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6747,
|
|
"src": "2465:13:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6732,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2465:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2464:15:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "2407:149:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 6771,
|
|
"nodeType": "Block",
|
|
"src": "2711:66:32",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
},
|
|
"id": 6769,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 6760,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6750,
|
|
"src": "2744:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 6759,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2738:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 6758,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2738:5:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6761,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2738:8:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 6757,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967288,
|
|
"src": "2728:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 6762,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2728:19:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 6766,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 6752,
|
|
"src": "2767:1:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 6765,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2761:5:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 6764,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2761:5:32",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 6767,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2761:8:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 6763,
|
|
"name": "keccak256",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967288,
|
|
"src": "2751:9:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
}
|
|
},
|
|
"id": 6768,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2751:19:32",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes32",
|
|
"typeString": "bytes32"
|
|
}
|
|
},
|
|
"src": "2728:42:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 6756,
|
|
"id": 6770,
|
|
"nodeType": "Return",
|
|
"src": "2721:49:32"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 6748,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2562:66:32",
|
|
"text": " @dev Returns true if the two strings are equal."
|
|
},
|
|
"id": 6772,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "equal",
|
|
"nameLocation": "2642:5:32",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 6753,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6750,
|
|
"mutability": "mutable",
|
|
"name": "a",
|
|
"nameLocation": "2662:1:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6772,
|
|
"src": "2648:15:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6749,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2648:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 6752,
|
|
"mutability": "mutable",
|
|
"name": "b",
|
|
"nameLocation": "2679:1:32",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6772,
|
|
"src": "2665:15:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 6751,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2665:6:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2647:34:32"
|
|
},
|
|
"returnParameters": {
|
|
"id": 6756,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6755,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 6772,
|
|
"src": "2705:4:32",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 6754,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2705:4:32",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2704:6:32"
|
|
},
|
|
"scope": 6773,
|
|
"src": "2633:144:32",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 6774,
|
|
"src": "220:2559:32",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "101:2679:32"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.10+commit.fc410830.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.14",
|
|
"updatedAt": "2023-07-12T06:52:15.344Z",
|
|
"devdoc": {
|
|
"details": "String operations.",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |