@ethsub/sol
Version:
ethsub contracts
1,134 lines • 105 kB
JSON
{
"contractName": "Strings",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"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\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5eefac1760f524971e14aa3f3d79515a3d54fd28c1d3bdca0b36127da349b830\",\"dweb:/ipfs/QmUMzkyH3ytJX5gVPizQruNLhkKmuJb3nFqBDad4LPdg5U\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220972e422ae8e5233065d4c58221b58fadf7de31737830c58d58d114673b5d7f8c64736f6c634300060c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220972e422ae8e5233065d4c58221b58fadf7de31737830c58d58d114673b5d7f8c64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "101:836:33:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "101:836:33:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n /**\n * @dev Converts a `uint256` to its ASCII `string` 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 uint256 index = digits - 1;\n temp = value;\n while (temp != 0) {\n buffer[index--] = bytes1(uint8(48 + temp % 10));\n temp /= 10;\n }\n return string(buffer);\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/utils/Strings.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/utils/Strings.sol",
"exportedSymbols": {
"Strings": [
6122
]
},
"id": 6123,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6037,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:31:33"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6038,
"nodeType": "StructuredDocumentation",
"src": "66:34:33",
"text": " @dev String operations."
},
"fullyImplemented": true,
"id": 6122,
"linearizedBaseContracts": [
6122
],
"name": "Strings",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 6120,
"nodeType": "Block",
"src": "281:654:33",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6048,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6046,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6041,
"src": "483:5:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6047,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "492:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "483:10:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 6052,
"nodeType": "IfStatement",
"src": "479:51:33",
"trueBody": {
"id": 6051,
"nodeType": "Block",
"src": "495:35:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "516:3:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"functionReturnParameters": 6045,
"id": 6050,
"nodeType": "Return",
"src": "509:10:33"
}
]
}
},
{
"assignments": [
6054
],
"declarations": [
{
"constant": false,
"id": 6054,
"mutability": "mutable",
"name": "temp",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6120,
"src": "539:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6053,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "539:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6056,
"initialValue": {
"argumentTypes": null,
"id": 6055,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6041,
"src": "554:5:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "539:20:33"
},
{
"assignments": [
6058
],
"declarations": [
{
"constant": false,
"id": 6058,
"mutability": "mutable",
"name": "digits",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6120,
"src": "569:14:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6057,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "569:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6059,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "569:14:33"
},
{
"body": {
"id": 6070,
"nodeType": "Block",
"src": "611:57:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "625:8:33",
"subExpression": {
"argumentTypes": null,
"id": 6063,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6058,
"src": "625:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6065,
"nodeType": "ExpressionStatement",
"src": "625:8:33"
},
{
"expression": {
"argumentTypes": null,
"id": 6068,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6066,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "647:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3130",
"id": 6067,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "655:2:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "647:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6069,
"nodeType": "ExpressionStatement",
"src": "647:10:33"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6062,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6060,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "600:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6061,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "608:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "600:9:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6071,
"nodeType": "WhileStatement",
"src": "593:75:33"
},
{
"assignments": [
6073
],
"declarations": [
{
"constant": false,
"id": 6073,
"mutability": "mutable",
"name": "buffer",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6120,
"src": "677:19:33",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 6072,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "677:5:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6078,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6076,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6058,
"src": "709:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 6075,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "699:9:33",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 6074,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "703:5:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 6077,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "699:17:33",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "677:39:33"
},
{
"assignments": [
6080
],
"declarations": [
{
"constant": false,
"id": 6080,
"mutability": "mutable",
"name": "index",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6120,
"src": "726:13:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6079,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "726:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 6084,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6083,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6081,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6058,
"src": "742:6:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 6082,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "751:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "742:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "726:26:33"
},
{
"expression": {
"argumentTypes": null,
"id": 6087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6085,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "762:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 6086,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6041,
"src": "769:5:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "762:12:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6088,
"nodeType": "ExpressionStatement",
"src": "762:12:33"
},
{
"body": {
"id": 6113,
"nodeType": "Block",
"src": "802:96:33",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 6107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 6092,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6073,
"src": "816:6:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 6095,
"indexExpression": {
"argumentTypes": null,
"id": 6094,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "--",
"prefix": false,
"src": "823:7:33",
"subExpression": {
"argumentTypes": null,
"id": 6093,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6080,
"src": "823:5:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "816:15:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6104,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"hexValue": "3438",
"id": 6100,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "847:2:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_48_by_1",
"typeString": "int_const 48"
},
"value": "48"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6101,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "852:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3130",
"id": 6102,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "859:2:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "852:9:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "847:14:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 6099,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "841:5:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 6098,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "841:5:33",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 6105,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "841:21:33",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 6097,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "834:6:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes1_$",
"typeString": "type(bytes1)"
},
"typeName": {
"id": 6096,
"name": "bytes1",
"nodeType": "ElementaryTypeName",
"src": "834:6:33",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 6106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "834:29:33",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "816:47:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 6108,
"nodeType": "ExpressionStatement",
"src": "816:47:33"
},
{
"expression": {
"argumentTypes": null,
"id": 6111,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 6109,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "877:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3130",
"id": 6110,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "885:2:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "877:10:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6112,
"nodeType": "ExpressionStatement",
"src": "877:10:33"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6091,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6089,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6054,
"src": "791:4:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 6090,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "799:1:33",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "791:9:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 6114,
"nodeType": "WhileStatement",
"src": "784:114:33"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6117,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6073,
"src": "921:6:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 6116,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "914:6:33",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 6115,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "914:6:33",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 6118,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "914:14:33",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 6045,
"id": 6119,
"nodeType": "Return",
"src": "907:21:33"
}
]
},
"documentation": {
"id": 6039,
"nodeType": "StructuredDocumentation",
"src": "123:82:33",
"text": " @dev Converts a `uint256` to its ASCII `string` representation."
},
"id": 6121,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 6042,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6041,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6121,
"src": "228:13:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6040,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "228:7:33",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "227:15:33"
},
"returnParameters": {
"id": 6045,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6044,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 6121,
"src": "266:13:33",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6043,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "266:6:33",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "strin