becrypto/build/contracts/Strings.json
2022-08-17 17:21:15 +08:00

5128 lines
213 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\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099440b9b22744aa6daceac37707dcdde1a8e218f31caf469f99b45f1cbcc599864736f6c634300080a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099440b9b22744aa6daceac37707dcdde1a8e218f31caf469f99b45f1cbcc599864736f6c634300080a0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "146:1885:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "146:1885:23:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\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 // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\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 if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\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] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/utils/Strings.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/Strings.sol",
"exportedSymbols": {
"Strings": [
5580
]
},
"id": 5581,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5379,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "86:23:23"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Strings",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 5380,
"nodeType": "StructuredDocumentation",
"src": "111:34:23",
"text": " @dev String operations."
},
"fullyImplemented": true,
"id": 5580,
"linearizedBaseContracts": [
5580
],
"name": "Strings",
"nameLocation": "154:7:23",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 5383,
"mutability": "constant",
"name": "_HEX_SYMBOLS",
"nameLocation": "193:12:23",
"nodeType": "VariableDeclaration",
"scope": 5580,
"src": "168:58:23",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
},
"typeName": {
"id": 5381,
"name": "bytes16",
"nodeType": "ElementaryTypeName",
"src": "168:7:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"value": {
"hexValue": "30313233343536373839616263646566",
"id": 5382,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "208:18:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f",
"typeString": "literal_string \"0123456789abcdef\""
},
"value": "0123456789abcdef"
},
"visibility": "private"
},
{
"body": {
"id": 5461,
"nodeType": "Block",
"src": "399:632:23",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5391,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "601:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5392,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "610:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "601:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5397,
"nodeType": "IfStatement",
"src": "597:51:23",
"trueBody": {
"id": 5396,
"nodeType": "Block",
"src": "613:35:23",
"statements": [
{
"expression": {
"hexValue": "30",
"id": 5394,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "634:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"functionReturnParameters": 5390,
"id": 5395,
"nodeType": "Return",
"src": "627:10:23"
}
]
}
},
{
"assignments": [
5399
],
"declarations": [
{
"constant": false,
"id": 5399,
"mutability": "mutable",
"name": "temp",
"nameLocation": "665:4:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "657:12:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5398,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "657:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5401,
"initialValue": {
"id": 5400,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "672:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "657:20:23"
},
{
"assignments": [
5403
],
"declarations": [
{
"constant": false,
"id": 5403,
"mutability": "mutable",
"name": "digits",
"nameLocation": "695:6:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "687:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5402,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5404,
"nodeType": "VariableDeclarationStatement",
"src": "687:14:23"
},
{
"body": {
"id": 5415,
"nodeType": "Block",
"src": "729:57:23",
"statements": [
{
"expression": {
"id": 5409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "743:8:23",
"subExpression": {
"id": 5408,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "743:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5410,
"nodeType": "ExpressionStatement",
"src": "743:8:23"
},
{
"expression": {
"id": 5413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5411,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5399,
"src": "765:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "773:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "765:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5414,
"nodeType": "ExpressionStatement",
"src": "765:10:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5405,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5399,
"src": "718:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "726:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "718:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5416,
"nodeType": "WhileStatement",
"src": "711:75:23"
},
{
"assignments": [
5418
],
"declarations": [
{
"constant": false,
"id": 5418,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "808:6:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "795:19:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 5417,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "795:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 5423,
"initialValue": {
"arguments": [
{
"id": 5421,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "827:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5420,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "817:9:23",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 5419,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "821:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 5422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:17:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "795:39:23"
},
{
"body": {
"id": 5454,
"nodeType": "Block",
"src": "863:131:23",
"statements": [
{
"expression": {
"id": 5429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5427,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "877:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "31",
"id": 5428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "887:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "877:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5430,
"nodeType": "ExpressionStatement",
"src": "877:11:23"
},
{
"expression": {
"id": 5448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5431,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5418,
"src": "902:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5433,
"indexExpression": {
"id": 5432,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "909:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "902:14:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3438",
"id": 5438,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "932:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
"value": "48"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5441,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "945:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "3130",
"id": 5442,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "953:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "945:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5440,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "937:7:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 5439,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "937:7:23",
"typeDescriptions": {}
}
},
"id": 5444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "937:19:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "932:24:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5437,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "926:5:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 5436,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "926:5:23",
"typeDescriptions": {}
}
},
"id": 5446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "926:31:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 5435,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "919:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes1_$",
"typeString": "type(bytes1)"
},
"typeName": {
"id": 5434,
"name": "bytes1",
"nodeType": "ElementaryTypeName",
"src": "919:6:23",
"typeDescriptions": {}
}
},
"id": 5447,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "919:39:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "902:56:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5449,
"nodeType": "ExpressionStatement",
"src": "902:56:23"
},
{
"expression": {
"id": 5452,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5450,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "972:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5451,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "981:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "972:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5453,
"nodeType": "ExpressionStatement",
"src": "972:11:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5424,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "851:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5425,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "860:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "851:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5455,
"nodeType": "WhileStatement",
"src": "844:150:23"
},
{
"expression": {
"arguments": [
{
"id": 5458,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5418,
"src": "1017:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 5457,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1010:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 5456,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1010:6:23",
"typeDescriptions": {}
}
},
"id": 5459,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1010:14:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5390,
"id": 5460,
"nodeType": "Return",
"src": "1003:21:23"
}
]
},
"documentation": {
"id": 5384,
"nodeType": "StructuredDocumentation",
"src": "233:90:23",
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation."
},
"id": 5462,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nameLocation": "337:8:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5387,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5386,
"mutability": "mutable",
"name": "value",
"nameLocation": "354:5:23",
"nodeType": "VariableDeclaration",
"scope": 5462,
"src": "346:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5385,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "346:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "345:15:23"
},
"returnParameters": {
"id": 5390,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5389,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5462,
"src": "384:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5388,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "384:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "383:15:23"
},
"scope": 5580,
"src": "328:703:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 5502,
"nodeType": "Block",
"src": "1210:255:23",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5470,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1224:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5471,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1233:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1224:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5476,
"nodeType": "IfStatement",
"src": "1220:54:23",
"trueBody": {
"id": 5475,
"nodeType": "Block",
"src": "1236:38:23",
"statements": [
{
"expression": {
"hexValue": "30783030",
"id": 5473,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1257:6:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4",
"typeString": "literal_string \"0x00\""
},
"value": "0x00"
},
"functionReturnParameters": 5469,
"id": 5474,
"nodeType": "Return",
"src": "1250:13:23"
}
]
}
},
{
"assignments": [
5478
],
"declarations": [
{
"constant": false,
"id": 5478,
"mutability": "mutable",
"name": "temp",
"nameLocation": "1291:4:23",
"nodeType": "VariableDeclaration",
"scope": 5502,
"src": "1283:12:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5477,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1283:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5480,
"initialValue": {
"id": 5479,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1298:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1283:20:23"
},
{
"assignments": [
5482
],
"declarations": [
{
"constant": false,
"id": 5482,
"mutability": "mutable",
"name": "length",
"nameLocation": "1321:6:23",
"nodeType": "VariableDeclaration",
"scope": 5502,
"src": "1313:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5481,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1313:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5484,
"initialValue": {
"hexValue": "30",
"id": 5483,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1330:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1313:18:23"
},
{
"body": {
"id": 5495,
"nodeType": "Block",
"src": "1359:57:23",
"statements": [
{
"expression": {
"id": 5489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1373:8:23",
"subExpression": {
"id": 5488,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5482,
"src": "1373:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5490,
"nodeType": "ExpressionStatement",
"src": "1373:8:23"
},
{
"expression": {
"id": 5493,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5491,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "1395:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "38",
"id": 5492,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1404:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1395:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5494,
"nodeType": "ExpressionStatement",
"src": "1395:10:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5487,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5485,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "1348:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5486,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1356:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1348:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5496,
"nodeType": "WhileStatement",
"src": "1341:75:23"
},
{
"expression": {
"arguments": [
{
"id": 5498,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1444:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 5499,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5482,
"src": "1451:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5497,
"name": "toHexString",
"nodeType": "Identifier",
"overloadedDeclarations": [
5503,
5579
],
"referencedDeclaration": 5579,
"src": "1432:11:23",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256,uint256) pure returns (string memory)"
}
},
"id": 5500,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1432:26:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5469,
"id": 5501,
"nodeType": "Return",
"src": "1425:33:23"
}
]
},
"documentation": {
"id": 5463,
"nodeType": "StructuredDocumentation",
"src": "1037:94:23",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation."
},
"id": 5503,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1145:11:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5466,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5465,
"mutability": "mutable",
"name": "value",
"nameLocation": "1165:5:23",
"nodeType": "VariableDeclaration",
"scope": 5503,
"src": "1157:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5464,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1157:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1156:15:23"
},
"returnParameters": {
"id": 5469,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5468,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5503,
"src": "1195:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5467,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1195:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1194:15:23"
},
"scope": 5580,
"src": "1136:329:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 5578,
"nodeType": "Block",
"src": "1678:351:23",
"statements": [
{
"assignments": [
5514
],
"declarations": [
{
"constant": false,
"id": 5514,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "1701:6:23",
"nodeType": "VariableDeclaration",
"scope": 5578,
"src": "1688:19:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 5513,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1688:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 5523,
"initialValue": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5521,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 5517,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1720:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 5518,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5508,
"src": "1724:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1720:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "32",
"id": 5520,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1733:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1720:14:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5516,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1710:9:23",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 5515,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1714:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 5522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1710:25:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1688:47:23"
},
{
"expression": {
"id": 5528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5524,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1745:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5526,
"indexExpression": {
"hexValue": "30",
"id": 5525,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1752:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1745:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "30",
"id": 5527,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1757:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"src": "1745:15:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5529,
"nodeType": "ExpressionStatement",
"src": "1745:15:23"
},
{
"expression": {
"id": 5534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5530,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1770:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5532,
"indexExpression": {
"hexValue": "31",
"id": 5531,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1777:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1770:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "78",
"id": 5533,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1782:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83",
"typeString": "literal_string \"x\""
},
"value": "x"
},
"src": "1770:15:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5535,
"nodeType": "ExpressionStatement",
"src": "1770:15:23"
},
{
"body": {
"id": 5564,
"nodeType": "Block",
"src": "1840:87:23",
"statements": [
{
"expression": {
"id": 5558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5550,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1854:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5552,
"indexExpression": {
"id": 5551,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1861:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1854:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"baseExpression": {
"id": 5553,
"name": "_HEX_SYMBOLS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5383,
"src": "1866:12:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"id": 5557,
"indexExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5556,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5554,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1879:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307866",
"id": 5555,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1887:3:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_15_by_1",
"typeString": "int_const 15"
},
"value": "0xf"
},
"src": "1879:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1866:25:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "1854:37:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5559,
"nodeType": "ExpressionStatement",
"src": "1854:37:23"
},
{
"expression": {
"id": 5562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5560,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1905:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 5561,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1915:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "1905:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5563,
"nodeType": "ExpressionStatement",
"src": "1905:11:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5544,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1828:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "31",
"id": 5545,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1832:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1828:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5565,
"initializationExpression": {
"assignments": [
5537
],
"declarations": [
{
"constant": false,
"id": 5537,
"mutability": "mutable",
"name": "i",
"nameLocation": "1808:1:23",
"nodeType": "VariableDeclaration",
"scope": 5565,
"src": "1800:9:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5536,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1800:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5543,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 5538,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1812:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 5539,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5508,
"src": "1816:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1812:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 5541,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1825:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1812:14:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1800:26:23"
},
"loopExpression": {
"expression": {
"id": 5548,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": true,
"src": "1835:3:23",
"subExpression": {
"id": 5547,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1837:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5549,
"nodeType": "ExpressionStatement",
"src": "1835:3:23"
},
"nodeType": "ForStatement",
"src": "1795:132:23"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5567,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1944:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1953:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1944:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74",
"id": 5570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1956:34:23",
"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": 5566,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1936:7:23",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1936:55:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5572,
"nodeType": "ExpressionStatement",
"src": "1936:55:23"
},
{
"expression": {
"arguments": [
{
"id": 5575,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "2015:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 5574,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2008:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 5573,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2008:6:23",
"typeDescriptions": {}
}
},
"id": 5576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2008:14:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5512,
"id": 5577,
"nodeType": "Return",
"src": "2001:21:23"
}
]
},
"documentation": {
"id": 5504,
"nodeType": "StructuredDocumentation",
"src": "1471:112:23",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length."
},
"id": 5579,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1597:11:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5509,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5506,
"mutability": "mutable",
"name": "value",
"nameLocation": "1617:5:23",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1609:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1609:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5508,
"mutability": "mutable",
"name": "length",
"nameLocation": "1632:6:23",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1624:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5507,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1624:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1608:31:23"
},
"returnParameters": {
"id": 5512,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5511,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1663:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5510,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1663:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1662:15:23"
},
"scope": 5580,
"src": "1588:441:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 5581,
"src": "146:1885:23",
"usedErrors": []
}
],
"src": "86:1946:23"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/utils/Strings.sol",
"exportedSymbols": {
"Strings": [
5580
]
},
"id": 5581,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5379,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "86:23:23"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Strings",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 5380,
"nodeType": "StructuredDocumentation",
"src": "111:34:23",
"text": " @dev String operations."
},
"fullyImplemented": true,
"id": 5580,
"linearizedBaseContracts": [
5580
],
"name": "Strings",
"nameLocation": "154:7:23",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 5383,
"mutability": "constant",
"name": "_HEX_SYMBOLS",
"nameLocation": "193:12:23",
"nodeType": "VariableDeclaration",
"scope": 5580,
"src": "168:58:23",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
},
"typeName": {
"id": 5381,
"name": "bytes16",
"nodeType": "ElementaryTypeName",
"src": "168:7:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"value": {
"hexValue": "30313233343536373839616263646566",
"id": 5382,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "208:18:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f",
"typeString": "literal_string \"0123456789abcdef\""
},
"value": "0123456789abcdef"
},
"visibility": "private"
},
{
"body": {
"id": 5461,
"nodeType": "Block",
"src": "399:632:23",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5391,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "601:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5392,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "610:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "601:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5397,
"nodeType": "IfStatement",
"src": "597:51:23",
"trueBody": {
"id": 5396,
"nodeType": "Block",
"src": "613:35:23",
"statements": [
{
"expression": {
"hexValue": "30",
"id": 5394,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "634:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"functionReturnParameters": 5390,
"id": 5395,
"nodeType": "Return",
"src": "627:10:23"
}
]
}
},
{
"assignments": [
5399
],
"declarations": [
{
"constant": false,
"id": 5399,
"mutability": "mutable",
"name": "temp",
"nameLocation": "665:4:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "657:12:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5398,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "657:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5401,
"initialValue": {
"id": 5400,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "672:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "657:20:23"
},
{
"assignments": [
5403
],
"declarations": [
{
"constant": false,
"id": 5403,
"mutability": "mutable",
"name": "digits",
"nameLocation": "695:6:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "687:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5402,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5404,
"nodeType": "VariableDeclarationStatement",
"src": "687:14:23"
},
{
"body": {
"id": 5415,
"nodeType": "Block",
"src": "729:57:23",
"statements": [
{
"expression": {
"id": 5409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "743:8:23",
"subExpression": {
"id": 5408,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "743:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5410,
"nodeType": "ExpressionStatement",
"src": "743:8:23"
},
{
"expression": {
"id": 5413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5411,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5399,
"src": "765:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "773:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "765:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5414,
"nodeType": "ExpressionStatement",
"src": "765:10:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5405,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5399,
"src": "718:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "726:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "718:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5416,
"nodeType": "WhileStatement",
"src": "711:75:23"
},
{
"assignments": [
5418
],
"declarations": [
{
"constant": false,
"id": 5418,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "808:6:23",
"nodeType": "VariableDeclaration",
"scope": 5461,
"src": "795:19:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 5417,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "795:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 5423,
"initialValue": {
"arguments": [
{
"id": 5421,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "827:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5420,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "817:9:23",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 5419,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "821:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 5422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:17:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "795:39:23"
},
{
"body": {
"id": 5454,
"nodeType": "Block",
"src": "863:131:23",
"statements": [
{
"expression": {
"id": 5429,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5427,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "877:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "31",
"id": 5428,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "887:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "877:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5430,
"nodeType": "ExpressionStatement",
"src": "877:11:23"
},
{
"expression": {
"id": 5448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5431,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5418,
"src": "902:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5433,
"indexExpression": {
"id": 5432,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5403,
"src": "909:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "902:14:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3438",
"id": 5438,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "932:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
"value": "48"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5441,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "945:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "3130",
"id": 5442,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "953:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "945:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5440,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "937:7:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 5439,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "937:7:23",
"typeDescriptions": {}
}
},
"id": 5444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "937:19:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "932:24:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5437,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "926:5:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 5436,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "926:5:23",
"typeDescriptions": {}
}
},
"id": 5446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "926:31:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 5435,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "919:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes1_$",
"typeString": "type(bytes1)"
},
"typeName": {
"id": 5434,
"name": "bytes1",
"nodeType": "ElementaryTypeName",
"src": "919:6:23",
"typeDescriptions": {}
}
},
"id": 5447,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "919:39:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "902:56:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5449,
"nodeType": "ExpressionStatement",
"src": "902:56:23"
},
{
"expression": {
"id": 5452,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5450,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "972:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5451,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "981:2:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "972:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5453,
"nodeType": "ExpressionStatement",
"src": "972:11:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5424,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5386,
"src": "851:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5425,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "860:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "851:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5455,
"nodeType": "WhileStatement",
"src": "844:150:23"
},
{
"expression": {
"arguments": [
{
"id": 5458,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5418,
"src": "1017:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 5457,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1010:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 5456,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1010:6:23",
"typeDescriptions": {}
}
},
"id": 5459,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1010:14:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5390,
"id": 5460,
"nodeType": "Return",
"src": "1003:21:23"
}
]
},
"documentation": {
"id": 5384,
"nodeType": "StructuredDocumentation",
"src": "233:90:23",
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation."
},
"id": 5462,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nameLocation": "337:8:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5387,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5386,
"mutability": "mutable",
"name": "value",
"nameLocation": "354:5:23",
"nodeType": "VariableDeclaration",
"scope": 5462,
"src": "346:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5385,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "346:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "345:15:23"
},
"returnParameters": {
"id": 5390,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5389,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5462,
"src": "384:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5388,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "384:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "383:15:23"
},
"scope": 5580,
"src": "328:703:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 5502,
"nodeType": "Block",
"src": "1210:255:23",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5470,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1224:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5471,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1233:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1224:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5476,
"nodeType": "IfStatement",
"src": "1220:54:23",
"trueBody": {
"id": 5475,
"nodeType": "Block",
"src": "1236:38:23",
"statements": [
{
"expression": {
"hexValue": "30783030",
"id": 5473,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1257:6:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4",
"typeString": "literal_string \"0x00\""
},
"value": "0x00"
},
"functionReturnParameters": 5469,
"id": 5474,
"nodeType": "Return",
"src": "1250:13:23"
}
]
}
},
{
"assignments": [
5478
],
"declarations": [
{
"constant": false,
"id": 5478,
"mutability": "mutable",
"name": "temp",
"nameLocation": "1291:4:23",
"nodeType": "VariableDeclaration",
"scope": 5502,
"src": "1283:12:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5477,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1283:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5480,
"initialValue": {
"id": 5479,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1298:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1283:20:23"
},
{
"assignments": [
5482
],
"declarations": [
{
"constant": false,
"id": 5482,
"mutability": "mutable",
"name": "length",
"nameLocation": "1321:6:23",
"nodeType": "VariableDeclaration",
"scope": 5502,
"src": "1313:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5481,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1313:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5484,
"initialValue": {
"hexValue": "30",
"id": 5483,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1330:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1313:18:23"
},
{
"body": {
"id": 5495,
"nodeType": "Block",
"src": "1359:57:23",
"statements": [
{
"expression": {
"id": 5489,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1373:8:23",
"subExpression": {
"id": 5488,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5482,
"src": "1373:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5490,
"nodeType": "ExpressionStatement",
"src": "1373:8:23"
},
{
"expression": {
"id": 5493,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5491,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "1395:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "38",
"id": 5492,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1404:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1395:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5494,
"nodeType": "ExpressionStatement",
"src": "1395:10:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5487,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5485,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5478,
"src": "1348:4:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5486,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1356:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1348:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5496,
"nodeType": "WhileStatement",
"src": "1341:75:23"
},
{
"expression": {
"arguments": [
{
"id": 5498,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5465,
"src": "1444:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 5499,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5482,
"src": "1451:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5497,
"name": "toHexString",
"nodeType": "Identifier",
"overloadedDeclarations": [
5503,
5579
],
"referencedDeclaration": 5579,
"src": "1432:11:23",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256,uint256) pure returns (string memory)"
}
},
"id": 5500,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1432:26:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5469,
"id": 5501,
"nodeType": "Return",
"src": "1425:33:23"
}
]
},
"documentation": {
"id": 5463,
"nodeType": "StructuredDocumentation",
"src": "1037:94:23",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation."
},
"id": 5503,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1145:11:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5466,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5465,
"mutability": "mutable",
"name": "value",
"nameLocation": "1165:5:23",
"nodeType": "VariableDeclaration",
"scope": 5503,
"src": "1157:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5464,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1157:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1156:15:23"
},
"returnParameters": {
"id": 5469,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5468,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5503,
"src": "1195:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5467,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1195:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1194:15:23"
},
"scope": 5580,
"src": "1136:329:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 5578,
"nodeType": "Block",
"src": "1678:351:23",
"statements": [
{
"assignments": [
5514
],
"declarations": [
{
"constant": false,
"id": 5514,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "1701:6:23",
"nodeType": "VariableDeclaration",
"scope": 5578,
"src": "1688:19:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 5513,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1688:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 5523,
"initialValue": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5521,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 5517,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1720:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 5518,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5508,
"src": "1724:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1720:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "32",
"id": 5520,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1733:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1720:14:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5516,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1710:9:23",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 5515,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1714:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 5522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1710:25:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1688:47:23"
},
{
"expression": {
"id": 5528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5524,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1745:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5526,
"indexExpression": {
"hexValue": "30",
"id": 5525,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1752:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1745:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "30",
"id": 5527,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1757:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"src": "1745:15:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5529,
"nodeType": "ExpressionStatement",
"src": "1745:15:23"
},
{
"expression": {
"id": 5534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5530,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1770:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5532,
"indexExpression": {
"hexValue": "31",
"id": 5531,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1777:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1770:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "78",
"id": 5533,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1782:3:23",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83",
"typeString": "literal_string \"x\""
},
"value": "x"
},
"src": "1770:15:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5535,
"nodeType": "ExpressionStatement",
"src": "1770:15:23"
},
{
"body": {
"id": 5564,
"nodeType": "Block",
"src": "1840:87:23",
"statements": [
{
"expression": {
"id": 5558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5550,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "1854:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5552,
"indexExpression": {
"id": 5551,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1861:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1854:9:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"baseExpression": {
"id": 5553,
"name": "_HEX_SYMBOLS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5383,
"src": "1866:12:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"id": 5557,
"indexExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5556,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5554,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1879:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307866",
"id": 5555,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1887:3:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_15_by_1",
"typeString": "int_const 15"
},
"value": "0xf"
},
"src": "1879:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1866:25:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "1854:37:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5559,
"nodeType": "ExpressionStatement",
"src": "1854:37:23"
},
{
"expression": {
"id": 5562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5560,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1905:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 5561,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1915:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "1905:11:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5563,
"nodeType": "ExpressionStatement",
"src": "1905:11:23"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5544,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1828:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "31",
"id": 5545,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1832:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1828:5:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5565,
"initializationExpression": {
"assignments": [
5537
],
"declarations": [
{
"constant": false,
"id": 5537,
"mutability": "mutable",
"name": "i",
"nameLocation": "1808:1:23",
"nodeType": "VariableDeclaration",
"scope": 5565,
"src": "1800:9:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5536,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1800:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5543,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "32",
"id": 5538,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1812:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"id": 5539,
"name": "length",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5508,
"src": "1816:6:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1812:10:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 5541,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1825:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1812:14:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1800:26:23"
},
"loopExpression": {
"expression": {
"id": 5548,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": true,
"src": "1835:3:23",
"subExpression": {
"id": 5547,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5537,
"src": "1837:1:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5549,
"nodeType": "ExpressionStatement",
"src": "1835:3:23"
},
"nodeType": "ForStatement",
"src": "1795:132:23"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5567,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5506,
"src": "1944:5:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1953:1:23",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1944:10:23",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74",
"id": 5570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1956:34:23",
"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": 5566,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1936:7:23",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1936:55:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5572,
"nodeType": "ExpressionStatement",
"src": "1936:55:23"
},
{
"expression": {
"arguments": [
{
"id": 5575,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5514,
"src": "2015:6:23",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 5574,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2008:6:23",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 5573,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "2008:6:23",
"typeDescriptions": {}
}
},
"id": 5576,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2008:14:23",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5512,
"id": 5577,
"nodeType": "Return",
"src": "2001:21:23"
}
]
},
"documentation": {
"id": 5504,
"nodeType": "StructuredDocumentation",
"src": "1471:112:23",
"text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length."
},
"id": 5579,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toHexString",
"nameLocation": "1597:11:23",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5509,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5506,
"mutability": "mutable",
"name": "value",
"nameLocation": "1617:5:23",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1609:13:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1609:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5508,
"mutability": "mutable",
"name": "length",
"nameLocation": "1632:6:23",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1624:14:23",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5507,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1624:7:23",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1608:31:23"
},
"returnParameters": {
"id": 5512,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5511,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5579,
"src": "1663:13:23",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5510,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1663:6:23",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1662:15:23"
},
"scope": 5580,
"src": "1588:441:23",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 5581,
"src": "146:1885:23",
"usedErrors": []
}
],
"src": "86:1946:23"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-17T06:09:48.176Z",
"devdoc": {
"details": "String operations.",
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}